Test a regular expression
Test regular expressions with live match highlighting, capture groups, flags and a quick-reference cheat sheet. JavaScript regex, free and private.
- Files never leave your device
- Free, no sign-up
- No watermark
About Regex Tester
Write and debug regular expressions with instant feedback. Type a pattern and a test string and every match is highlighted as you type, with capture groups listed separately so you can see exactly what each part of your pattern grabs. Toggle the global, case-insensitive, multiline and other flags, and use the built-in cheat sheet when you forget the syntax. It uses the JavaScript regex engine, the same one your browser and Node.js run.
How to use Regex Tester
- 1
Enter your regex pattern.
- 2
Choose flags such as g, i or m.
- 3
Paste the text to test against.
- 4
Review highlighted matches and capture groups.
Why use this tool
- Real-time match highlighting.
- Capture groups shown separately.
- All JavaScript regex flags.
- Built-in quick-reference cheat sheet.
- Sample patterns to start from.
Frequently asked questions
JavaScript (ECMAScript), as used by browsers and Node.js. Most syntax is shared with PCRE, Python and Java.
Add the g flag to find all matches instead of the first.
Use the m flag for ^ and $ per line, and the s flag to let . match newlines.
Parentheses in a pattern capture the matched text so you can reuse it, for example in a replacement.
Yes. Paste sample addresses and adjust the pattern until only valid ones match.
No. Everything is processed in your browser tab. Nothing you type or paste is sent to CodeMites or any other server.
Yes. There is no account, no watermark and no usage limit. The tool runs in your own browser, so there is no server cost to charge you for.
Yes. It runs in any modern browser on Android and iOS as well as on Windows, macOS and Linux, with nothing to install.
Yes, once the page has loaded. Everything runs in your browser, so you can keep working on a train or plane without a connection.
Related tools
All Developer tools →- Diff CheckerCompare two texts or code files and highlight added, removed and changed lines in split or unified view.
- URL Encoder & DecoderEncode text for safe use in URLs or decode percent-encoded strings, with component and full-URL modes.
- Cron Expression BuilderBuild cron expressions with dropdowns, read them in plain English and preview the next run times.
- Chmod CalculatorSet Unix file permissions with checkboxes and get the octal value, symbolic notation and chmod command.
- CIDR CalculatorCalculate network address, broadcast, host range, subnet mask and host count from CIDR notation, with binary view.
- UUID GeneratorGenerate random v4 or timestamp-based v1 UUIDs, one at a time or up to 100 in bulk, and validate existing UUIDs.