OneFirewall Alliance

Regex Tester

Test regular expressions in real-time — highlight matches, inspect groups, replace and validate

Enter a regular expression and sample text to see matches highlighted as you type, inspect capture groups, test flags and try search-and-replace before using the pattern in your code. More free security tools.

Presets
Email
URL
IPv4
IPv6
UUID
Phone
Date (ISO)
JWT
Hex Colour
SemVer
CVE ID
MD5 Hash
/
/
g
i
m
s
u
Highlighted Matches
Replace
How It Works & Why It Matters

Regular expressions are deceptively easy to get subtly wrong — a greedy quantifier that backtracks catastrophically, a capture group that shifts index when you add a new group earlier in the pattern, or a flag you forgot to set. This tester runs your pattern against the browser's native RegExp engine (the same engine your JavaScript code will use), so what you see here is what you'll get in production.

Matches highlight live as you type, capture groups are broken out individually so you can confirm you're referencing the right one, and the search-and-replace panel lets you test a substitution pattern — including backreferences — before you commit it to code.

Need help building secure input validation and WAF rules for your applications?

If you like this tool, Speak with OneFirewall