6 patterns
Email Validation Regex Patterns
Email validation is one of the most common tasks in web development. Whether you need a quick front-end check or a strict RFC-compliant validator, these tested patterns cover every use case - including international addresses, subdomains, and long TLDs.
Common Use Cases
All Email Validation Patterns
Basic Email Validation
Validates common emails. Covers 99% of cases.
^[\w.-]+@[\w.-]+\.\w{2,4}$Strict Email Validation RFC 5322
Strict validation compliant with RFC 5322.
^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$Email with Subdomains
Accepts multiple levels of subdomains.
^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,}$Email Extraction
Extracts all emails from a text.
\b[\w.-]+@[\w.-]+\.\w{2,4}\bEmail with Long TLD
Validates emails with TLDs up to 24 characters (e.g., .technology, .museum).
^[A-Za-z0-9._%+-]+@[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*\.[A-Za-z]{2,24}$Simple Safe Email
Lightweight validation for front-end forms (prevents injections).
^[^@\s]+@[^@\s]+\.[^@\s]+$Frequently Asked Questions
Which email regex should I use for a login form?
Use the "Simple Safe Email" pattern - it's lightweight, prevents injections, and covers 99% of real-world emails.
Is there a perfect email regex?
No. The only 100% reliable validation is sending a confirmation email. Use regex as a first-pass filter only.
How do I validate emails in JavaScript?
const isValid = /^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)
Looking for patterns in other categories?
Browse all 209 patterns