Regex Tester
Test regular expressions against text with live match highlighting.
Test regular expressions with live match highlighting
Regular expressions are compact but unforgiving, and one stray quantifier can make your pattern match everything or nothing. This regex tester lets you write a pattern, apply flags, and instantly see every match highlighted inside your sample text, so you can refine the expression until it captures exactly what you intend.
How it works
The tool uses your browser's native JavaScript regular-expression engine, so behaviour matches what you get in Node.js and front-end code. Type a pattern and toggle flags like g, i, m, and s; matches and capture groups update as you type. Everything runs locally, so you can test patterns against sensitive log samples without anything leaving your device.
Practical use cases
- Validate email, URL, or phone formats before shipping a form.
- Extract capture groups from log lines or scraped text.
- Prototype a search-and-replace pattern, then apply it in Find and Replace.
- Check which characters need escaping with the Backslash Escape / Unescape tool.
Comparing two versions of a pattern's output? The Text Diff Checker makes the differences easy to spot.
Private and free
Because matching happens entirely client-side, your patterns and test text stay in your browser, with no upload, no account, and no tracking. The regex tester is free and works on every modern browser, including mobile.
Frequently asked questions
Your browser's native JavaScript engine, so results match what you get in Node.js and browser code.
Related tools
Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes from any text.
Bcrypt Generator
Hash a password with bcrypt and verify a value against a hash.
HTTP Status Codes
A searchable reference of every HTTP status code and what it means.
JSON Path Finder
Explore a JSON tree and copy the exact path to any value.