Writer & Dev
Regex Tester Online: Test JavaScript Regular Expressions Live
Test JavaScript regular expressions with live match highlighting, capture groups, and a replace preview. Pick flags g, i, m, s, u, y in one click.
Runs in your browser — your text is never uploaded or stored.
//
Test text
Matches highlighted
Contact ada@example.com or grace@navy.mil for details.
Matches (2)
- match 1: ada@example.com @ 8$1=ada$2=example.com
- match 2: grace@navy.mil @ 27$1=grace$2=navy.mil
Replace preview
How to Use
- 1.Type your regex pattern and pick flags (g, i, m…).
- 2.Paste the test text — matches highlight in real time.
- 3.Optionally add a replacement string to preview the substitution.
Advertisement
FAQ
Which regex flavor does it use?
JavaScript's built-in RegExp — the same engine that runs in your browser and Node.js. That means PCRE features like recursive patterns are not supported.
Does it show capture groups?
Yes. Each match lists its numbered and named capture groups so you can debug complex patterns quickly.
Is my regex or test text uploaded?
No. All matching happens locally with the native RegExp engine.
Related tools
Find and Replace
Find and replace text in your browser with match-case, whole-word and replace-all options. Free, private and instant.
Extract Emails
Pull every email address out of any pasted text into a clean, deduplicated list. Free, private and instant in your browser.
Extract URLs
Pull every URL out of any pasted text into a clean, deduplicated list. 100% private and runs in your browser.
JSON Formatter
Free online JSON formatter and validator. Pretty-print, minify and validate JSON with clear error messages — 100% in your browser.