Getting a regular expression right by trial and error in code is slow. Type a pattern and some test text here and see every match highlighted live, with clear errors if the pattern itself is invalid — all running on JavaScript's native regex engine, entirely in your browser.
How to use the regex tester tool
- 1
Enter your pattern
Type a regular expression and set flags like g (global) or i (case-insensitive).
- 2
Paste test text
Add the text you want to check the pattern against.
- 3
Review matches
Matches are highlighted directly in the text, with a running match count.
Common use cases
Validate an email pattern
Test a regex meant to match email addresses against real examples before using it in code.
Extract data with capture groups
Check that a pattern correctly matches the parts of text you need.
Debug a regex that isn't matching
See exactly what a pattern does and doesn't match against your actual sample text.
Frequently asked questions
JavaScript's native RegExp engine — the same one used by browsers and Node.js.