Regex Tester
Test regular expressions with live highlighting, matches and capture groups.
How to Use the Regex Tester
Enter your regular expression pattern in the input field, choose the flags you need, then type or paste your test string. Matches are highlighted in real time as you type.
What This Tool Does
- Live Highlighting — matches are highlighted in yellow as you type your pattern and test string
- Match Details — see the total number of matches, each match value, its position index and any captured groups
- Flags — toggle global (g), case-insensitive (i), multiline (m) and dotAll (s) flags with checkboxes
- Cheat Sheet — expand the built-in reference for common regex tokens, quantifiers and groups
The tool runs entirely in your browser using the native JavaScript RegExp engine. No data is sent to any server.
Frequently Asked Questions
What regex syntax does this tool support?
This tool uses the JavaScript RegExp engine built into your browser. It supports all standard regex syntax including character classes, quantifiers, lookaheads, lookbehinds (in modern browsers), named groups and more.
What do the flags do?
The g (global) flag finds all matches instead of stopping at the first. The i flag makes the match case-insensitive. The m (multiline) flag makes ^ and $ match the start and end of each line. The s (dotAll) flag makes the dot (.) match newline characters as well.
How do I test capture groups?
Use parentheses in your pattern to create capture groups, for example (\w+)@(\w+). The tool will show each group value below the full match in the results list.
Is my data sent to a server?
No. All matching and highlighting is performed locally in your browser using the native RegExp engine. Your test strings and patterns never leave your device.
Why do I get an "Invalid regex" error?
This usually means your pattern has a syntax error such as unmatched parentheses, an invalid quantifier or an incomplete escape sequence. Check the error message for details about what went wrong.
More Developer Tools
JSON Formatter
Format, validate and minify JSON with syntax highlighting.
Open tool →Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text.
Open tool →UUID Generator
Generate UUID v4 identifiers, single or in bulk.
Open tool →Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back.
Open tool →URL Encode / Decode
Encode or decode URLs and query parameters.
Open tool →HTML Entity Encode / Decode
Encode special characters to HTML entities or decode them back.
Open tool →