Regex Tester Online

Use JavaScript RegExp syntax. Enter the pattern without leading and trailing slashes.

Test text
Matches
Ready

Free Online Regex Tester

Type a JavaScript regular expression, choose flags, paste test text and see matches instantly. Match results include indexes, matched text and numbered capture groups.

JavaScript Regular Expression Flags

Use g for global matching, i for ignore case, m for multiline anchors, s for dot-all matching, u for Unicode mode and y for sticky matching.

Private Browser-Based Testing

The regex engine runs locally in your browser. Patterns and test text are not uploaded to a server, which makes it convenient for logs, snippets and API responses you need to inspect quickly.

Frequently asked questions

Should I include slashes around the regex?
No. Enter only the pattern, such as \\d+. Add flags like gi in the flags field or with the checkboxes.
Why do I only see one match?
Enable the global g flag to list all matches. Without g, JavaScript returns the first match.
Does this tool save my text?
No. Testing happens in your browser and your text is not sent anywhere.