Regex Tester
Test, debug, and validate regular expressions in real-time. Highlight matches, extract groups, and preview replacements instantly.
Match Results
Match Highlighting
Waiting for input...
Match Details
Replacement Result
Regex Quick Reference
Click a pattern to insert it into the tester
Email Address
Matches standard email formats
[a-z]+@...
URL (HTTP/HTTPS)
Matches web links starting with http or https
https?://...
SSN (US Format)
Matches 123-45-6789 format exactly
^\d{3}-...
Strong Password
Min 8 chars, 1 uppercase, 1 lowercase, 1 number
(?=.*[a-z])...
Hex Color Code
Matches #FFF or #FFFFFF
#([a-f0-9]...
Frequently Asked Questions
What do the flags (g, i, m, s) mean?
g (Global): Don't return after the first match, find all matches.
i (Insensitive): Case insensitive match (ignores A vs a).
m (Multiline): ^ and $ match start/end of line, not just string.
s (Dotall): The . character matches newlines as well.
How do I use the Replacement String?
Enter the text you want to replace matches with. You can use special variables like $1, $2 to refer to capturing groups in your regex. For example, if regex is (\w+), (\w+) and replacement is $2 $1, it swaps the words.
Is my data private?
Yes. All processing happens locally in your browser using JavaScript. Your regex patterns and test strings are never sent to a server.