Regex Tester
Write a regular expression and see it match your text live — highlighted inline, with every match, position and capture group listed. It uses your browser’s own regex engine, so results match your JavaScript exactly, and nothing is uploaded.
- 🔒 100% private — no uploads
- 🆓 Free, no watermark
- 📱 Works on any device
How to test a regular expression
- 1
Type your pattern
Enter a regular expression and toggle the flags (g, i, m, s, u, y). An invalid pattern shows the error instead of failing silently.
- 2
Paste the test string
Add the text to match against. Matches are highlighted live as you type — no “run” button.
- 3
Inspect the matches
See the match count, every match with its position, and the numbered or named capture groups in a table.
Why use Regex Tester?
Live highlighting
Every match is highlighted in your text as you edit the pattern, with a table of positions and capture groups.
Real JS engine
Uses your browser’s native regular-expression engine, so behaviour matches exactly what your JavaScript will do.
100% private
Everything runs locally in your browser with JavaScript. Your input is never uploaded, stored or seen by anyone — it even works offline once the page has loaded.
Works on any device
No install and no account. Runs in any modern browser on Windows, macOS, Linux, Android or iPhone.
Test the edge cases before they test you
Most regex bugs aren’t in what the pattern matches — they’re in what it accidentally also matches, or silently misses. Paste realistic sample data (including the messy lines: empty fields, unicode, trailing spaces) and watch the highlighting as you refine the pattern. Anchors (^ $), word boundaries (\b) and lazy quantifiers (*?) fix most “it matched too much” surprises, and you’ll see the effect live instead of discovering it in production.
The JavaScript flavor, exactly
This tester uses your browser’s native RegExp engine, so behaviour matches your JavaScript code precisely — including named groups (?<name>…), lookbehind (?<=…), the s (dotAll) and u (unicode) flags, and sticky y. That also means PCRE-only syntax from other languages (possessive quantifiers, \K, inline modifiers) won’t work here, exactly as it wouldn’t in your JS — which is the point.
Frequently asked questions
Does it show capture groups?
Yes. Each match lists its numbered capture groups ($1, $2, …) and any named groups (?<name>…), along with the match text and its index in the string.
Which regex flavor is this?
It’s the JavaScript (ECMAScript) regular-expression engine built into your browser, with the g, i, m, s, u and y flags. Patterns behave exactly as they will in your JS code.
Is my data uploaded to a server?
No. The tool runs entirely in your browser, so whatever you paste stays on your device. It’s safe for tokens, secrets and confidential data, and works offline once loaded.