Test JavaScript regex patterns instantly.
Write a regular expression, choose flags, paste test text, and inspect live matches, indexes, capture groups, highlighting, and replacement output in your browser.
Highlighted text
Matches will appear here.
Match details
A practical JavaScript regex tester for quick debugging.
Regular expressions are easier to reason about when you can see every match and capture group. This tool uses the browser's JavaScript RegExp engine, so it is useful for frontend code, Node.js snippets, form validation, text cleanup, and editor replacement patterns.
Live match inspection
See match text, start index, end index, and capture groups for each result.
Replacement preview
Try replacement strings with `$&`, `$1`, `$2`, and other JavaScript replacement syntax.
No server round trip
Patterns and test text are evaluated locally in your browser for quick private checks.
Regex engine note.
This tester uses JavaScript regular expressions. Syntax and behavior may differ from PCRE, Python, Ruby, Java, .NET, grep, or database regex engines. If you are debugging a production regex, test it in the same language or runtime before shipping.
FAQ
How do I test a regex online?
Enter a pattern, choose flags, paste test text, and inspect highlighted matches, indexes, and capture groups.
Which regex flavor is supported?
This tool uses JavaScript RegExp syntax and behavior because it runs directly in your browser.
Does it support capture groups?
Yes. Match details show numbered capture groups for each match when your pattern includes them.
Can I test replacement strings?
Yes. Enter replacement text and the tool shows the JavaScript replacement output.
Is my test text uploaded?
No. Regex testing happens locally in the page. The tool does not need a backend to evaluate matches.
Why does my regex behave differently elsewhere?
Different languages have different regex engines. Always test important patterns in the runtime where they will be used.