Enter a pattern
Flags:
/ /
Test String 0 characters
Results 0 matches
Results will appear here...
Matches: 0
Groups: 0
Steps:
Time:

Free Online Regex Tester & Debugger

Test and debug your regular expressions in real time. Our regex tester provides instant matching, pattern explanation, and a library of 25+ common patterns — all running 100% in your browser. No data is sent to any server.

Features

Real-time matching — See matches highlighted as you type. Supports global, case-insensitive, multiline, and dotall flags.

Pattern explanation — Click "Explain" to see a token-by-token breakdown of your regex in plain English. Great for learning and debugging.

Find & Replace — Test regex replacements with backreferences ($1, $2) before using them in your code.

Pattern Library — Browse 25+ pre-built patterns for email, URL, IP addresses, dates, UUID, JWT, credit cards, and more.

Common Regex Patterns

PatternDescription
[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}Email address
https?://[^\s]+URL
\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\bIPv4 address
\d{4}-\d{2}-\d{2}ISO date
#[0-9a-fA-F]{3,6}\bHex color

Regex Cheat Sheet

TokenMeaning
.Any character (except newline)
\dDigit [0-9]
\wWord character [a-zA-Z0-9_]
\sWhitespace
^ / $Start / End of line
*0 or more
+1 or more
?0 or 1 (optional)
{n,m}Between n and m times
(abc)Capture group
(?:abc)Non-capturing group
a|ba OR b
[abc]Any of a, b, c
[^abc]Not a, b, or c
(?=abc)Lookahead
(?<=abc)Lookbehind

Why Use This Tool?

Regular expressions are powerful but can be tricky to get right. This tool lets you iterate quickly — see matches in real time, understand what each token does, and test replacements before committing to code. Works with JavaScript regex syntax.