JavaScript Regex Tester
Test a JavaScript (JS) regex online: write a pattern, paste text, and see every match and capture group highlighted live. Everything runs locally.
Runs locally in your browser
Matches (highlighted)
How to use Regex Tester
- Type your regular expression along with the flags you need.
- Paste sample text and watch every match highlight in real time.
- Open the capture group breakdown to inspect each match in detail.
Common use cases
- Debug a validation pattern before shipping it to production.
- Test edge cases against real log lines or user input samples.
- Figure out how a borrowed regex actually behaves, group by group.
- Verify capture group numbering before writing a replacement.
Good to know
- Uses the JavaScript regex engine; other languages may behave differently.
- Catastrophic backtracking on hostile input can freeze the tab.
- Lookbehind support depends on your browser version.
FAQ
Which JavaScript regex features can I test?
JavaScript (the RegExp your browser runs). Flags supported: g i m s u y d. Lookbehind and named groups work in modern browsers.
Is my text sent anywhere?
No — matching runs locally in your browser. Log lines, emails and other sensitive samples stay on your device.
Why does my pattern match "∅"?
That's a zero-width match (e.g. \b or an optional group). They're shown as ∅ markers so you can see where they fire without an infinite loop.