Regex Tester
Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.
100% Client-SideEnter a pattern and flags, paste test text, and see every match and capture group as you type.
How to use the Regex Tester
- 1
Type your regular expression in the pattern box (without the surrounding slashes).
- 2
Toggle flags such as g (global), i (ignore case), m (multiline) and s (dot matches newlines).
- 3
Paste the text to test — matches are highlighted live.
- 4
Inspect each match's position and its numbered and named capture groups.
- 5
Enter a replacement (with $1, $<name> and so on) to preview the replaced text.
Frequently asked questions
More developer tools
JSON Formatter & Validator
Pretty-print, minify and validate JSON with exact error locations, sorted keys and custom indentation.
Base64 Encode & Decode
Encode text or files to Base64 and decode Base64 back to text or a file. UTF-8 safe, with URL-safe mode.
JWT Decoder
Decode JSON Web Tokens to read the header and payload, check expiry, and verify HMAC signatures.
Missing a feature or tool?
Tell us what would make Regex Tester more useful, or what to build next.