Developer Tools
Regex Tester
Test and debug regular expressions in your browser. Live highlights, match indices, capture groups, named captures, and replacement preview.
Quick samples
Match details
- Match 1index 8end 25length 17
alice@example.com
- Match 2index 29end 54length 25
bob.smith+work@mail.co.uk
Replacement preview
Each match wrapped in<<$&>>so you can see exactly what your regex captures.
Contact <<alice@example.com>> or <<bob.smith+work@mail.co.uk>> for details.
How to use
- Type or paste a regular expression into the pattern field.
- Toggle flags like g (global), i (case insensitive), or s (dotall) as needed.
- Paste the text you want to match against into the test text area.
- Read the highlighted matches, capture groups, and replacement preview, and use any Copy button to grab the literal regex, a single match, or all matches.
About this tool
Regex Tester compiles your pattern with the JavaScript regular expression engine that ships with every modern browser, so the behavior matches what your code will actually do at runtime. Type a pattern, toggle the g, i, m, s, u, and y flags, and paste any sample text to see every match highlighted in place. The tool reports the index, end position, and length of each match, lists numbered and named capture groups with their captured values, and produces a replacement preview that wraps every match in a marker so you can see exactly what your regex captures. Patterns are validated as you type, and clear syntax errors appear inline. Everything runs in your browser, so the patterns you are debugging and the data you are matching against never leave your device.
Free to use. Works in your browser. No signup, no login.
Related tools