Email Regex Pattern & Tester
Test email validation regex patterns with real-time highlighting. Copy a battle-tested email regex pattern or build your own and test it against sample email addresses.
Regex Tester
Test regular expressions in real time with match highlighting and capture groups.
Matches (0)
Enter a pattern and test string to see matches
Simple email regex
A practical email regex for most use cases: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ — this matches standard email formats with alphanumeric characters, common special characters in the local part, and a domain with a TLD of 2+ characters. It covers 99% of real-world email addresses.
Why perfect email regex is impossible
The official email specification (RFC 5322) allows extremely unusual addresses like "quoted strings"@domain, (comments)user@domain, and even IP addresses as domains. A truly RFC-compliant regex is thousands of characters long and impractical. In practice, use a simple regex for basic validation, then verify with a confirmation email.
Frequently Asked Questions
What is the best email regex?
For most applications: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ — it balances strictness with real-world compatibility. For production, pair it with a confirmation email for true validation.
Should I validate emails with regex alone?
No. Regex can check format, but cannot verify the email exists or is deliverable. Always send a confirmation email for true validation. Use regex only as a first-pass filter.