Regex Tester
Test JavaScript regular expressions live with highlighted matches and groups.
JavaScript regex flavour. Runs entirely in your browser. Your input is never sent to a server.
About the regex tester
Build and debug regular expressions with instant feedback. Matches are highlighted in your sample text, capture groups are listed with their positions, and a replace field previews substitutions.
How to use it
- Enter a pattern and choose flags.
- Paste the text to test against.
- Review highlighted matches, groups and the replacement preview.
Frequently asked questions
Which regex flavour does it use?
JavaScript (ECMAScript). Features like lookbehind work in modern browsers, but other flavours such as PCRE or Java differ in places.
What about catastrophic backtracking?
A badly written pattern can freeze the tab. Matching is capped at 5,000 results, but extremely backtracking-prone patterns can still be slow.
Related tools
Text Diff Checker
Compare two texts side by side and see what was added, removed or changed.
Remove Duplicate Lines
Deduplicate lists with case, whitespace and sorting options.
SQL Formatter
Beautify SQL with consistent keyword case, indentation and clause layout.
JSON Formatter & Validator
Format, minify, validate and explore JSON with precise error positions.