Regex tester
Test regular expressions live, with highlighted matches and capture groups.
Formatting & validation100% client-side
Pattern
//gm
Test string
Recent
Nothing here yet.
About this tool
Write a pattern and see every match highlighted in your test string as you type, with each match broken down into its numbered and named capture groups. Flags are toggled individually, so you can watch how global, case-insensitive, multiline and dot-all change the result.
The engine is your browser's own JavaScript regex implementation — the same one your code will run — so behaviour here matches production behaviour, including its differences from PCRE or RE2.
How to use it
- 1Type your regular expression, without the surrounding slashes.
- 2Toggle the flags you need — g, i, m, s, u and y.
- 3Paste a test string and read the match list underneath.
Privacy
This tool runs entirely in your browser. Nothing you type or paste is sent to a server, and your local history is stored only on this device.
Related tools
- JSON formatter & validatorPretty-print, minify and validate JSON with precise error positions.
- XML formatter & validatorIndent, minify and well-formedness-check XML documents.
- JWT decoder & validatorDecode header and payload, inspect claims and check expiry.
- SQL formatterFormat queries across PostgreSQL, MySQL, SQLite, BigQuery and more.
