Regex Tester
Test regular expressions against your text, live.
Runs in your browser Runs entirely in your browser. Nothing you put in it ever leaves your device.
Enter a pattern to start matching.
Matches
0 found
Use $1, $2 for capture groups, or $<name> for named groups.
Capture groups
No matches yet.
Was this useful?
About this tool
Type a pattern and see every match highlighted as you go, with capture groups and named groups listed per match. There is also a replace preview, so you can check a substitution before running it for real.
How to use it
- Enter a pattern and pick your flags.
- Paste the text you want to search.
- Read the highlighted matches and the group table below.
- Optionally enter a replacement to preview the result.
Supported input
- JavaScript (ECMAScript) regular expressions
Privacy
Runs entirely in your browser. Nothing you put in it ever leaves your device. Everything happens in JavaScript on this page, so the tool keeps working even if you go offline after it has loaded — which is the simplest way to see for yourself that nothing is being sent. Read the full privacy information.
Questions
Which regex flavour is this?
JavaScript’s, because the matching is done by your browser’s own engine. It is close to PCRE for everyday patterns, but lookbehind support and some Unicode escapes differ from PHP or Python.
Can a pattern hang the page?
A catastrophically backtracking pattern can be slow. Matching runs against a bounded slice of your text and stops after a match limit, so the page stays usable — you will see a warning instead of a freeze.
Is my text sent anywhere?
No. The pattern and the text stay in your browser.
Related tools
-
JSON Formatter
Format, validate and inspect JSON.
Stays on your device
-
Base64 Encoder / Decoder
Encode text or files to Base64, and decode it back.
Stays on your device
-
Hash Generator
SHA-256, SHA-384 and SHA-512 for text or a file.
Stays on your device
-
JSON Diff
Compare two JSON documents and see exactly what changed.
Stays on your device