Skip to main content

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.

Processed locally · 0 bytes uploaded

Matches (highlighted)

How to use Regex Tester

  1. Type your regular expression along with the flags you need.
  2. Paste sample text and watch every match highlight in real time.
  3. 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.

Specs

Supported formats
Input: JavaScript RegExp pattern + flags (g, i, m, s, u) & test text · Output: Live match highlights & capture groups
File & batch limits
Real-time evaluation on text samples up to hundreds of KB (subject to standard JS RegExp backtracking)
AI model download
None (0 MB — native JavaScript RegExp engine)
Browsers & devices
Chrome, Edge, Safari & Firefox on desktop and mobile
Offline support
Yes — works 100% offline once loaded

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.

Share this tool: