Free Regex Tester
Test a JavaScript pattern against real sample text — matches, capture groups and a replace preview, with no upload. Paste production log lines safely: everything runs locally.
Flags
Something not working?
Tell us what went wrong — it helps us fix the tool. Only what you type below is sent.
Need more power? Meet Regex Tester Pro
One-time payment. Yours forever. No subscription.
| Feature | Free | Pro |
|---|---|---|
| Live matches with indices and capture groups | Yes | Yes |
| Replace preview with $1, $2 and $& | Yes | Yes |
| Common-pattern presets (email, URL, date, slug) | Yes | Yes |
| Saved pattern library and test cases | — | Yes |
| Ads | — | Yes |
Frequently asked questions
Is my test text uploaded?
No. Matching uses your browser's built-in RegExp engine. The pattern and test string never leave your device — that is the whole point, since regex testing is usually done on real log lines and customer data.
Which regex flavour is this?
JavaScript, the same engine Node.js and every browser use. Most Python, PCRE and Java patterns work unchanged, but JavaScript has no possessive quantifiers or atomic groups.
Why does my pattern only find one match?
Without the g flag, a regex stops at the first match — that is also how String.replace behaves. Tick g to find every match.
What do $1 and $& mean in the replacement?
$1, $2 and so on insert capture groups, $& inserts the whole match, and $$ inserts a literal dollar sign — exactly the syntax JavaScript's replace method accepts.