Regex Tester
Test patterns against sample text with live match highlighting.
Input
This tool runs entirely in your browser. The data you paste or load is never uploaded.
Result
Enter your input, then run the tool.
About this tool
A live regular expression workbench: see matches highlighted, inspect capture groups, and preview a replacement string with $1 references. Patterns run in your browser with the flags you choose, and dangerous input length is capped.
How to use it
- Type a pattern (without slashes) and pick flags such as g, i and m.
- Paste the test text; matches are highlighted as you type.
- Use the replacement field to preview a substitution, then copy the pattern.
Frequently asked questions
Which regex flavour is used?
The JavaScript engine (ECMAScript). Lookbehind, named groups and Unicode property escapes are supported in modern browsers but are not identical to PCRE or Python.
Why does a pattern freeze the page?
Some patterns backtrack exponentially. This tool caps input size and iteration count, but simplify nested quantifiers if a match stalls.
Keep going
Related tools
Find and Replace Text
Replace text with plain strings or regular expressions.
Text Diff Checker
Compare two texts line by line and see what changed.
Text to ASCII Converter
Convert text to ASCII codes and back, in any base.
JSON Formatter
Pretty-print compact or broken JSON with a readable indentation.
JSON Validator
Check JSON syntax and see exactly where it breaks.
JSON Minifier
Strip whitespace from JSON to shrink payloads.