Skip to main content
CalcHive

Regex for Email Address

Matches standard email addresses with common TLDs. Covers most real-world email formats used in web forms and validation.

Pattern

/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/

Pattern Breakdown

TokenExplanation
^Start of string
[a-zA-Z0-9._%+-]+One or more allowed characters in the local part (letters, digits, dots, underscores, percent, plus, hyphen)
@Literal @ symbol separating local and domain parts
[a-zA-Z0-9.-]+Domain name (letters, digits, dots, hyphens)
\.Literal dot before TLD
[a-zA-Z]{2,}Top-level domain with 2 or more letters
$End of string

Test Examples

InputMatch?
user@example.comMatch
first.last@company.co.ukMatch
user+tag@gmail.comMatch
invalid@No match
@nodomain.comNo match
spaces in@email.comNo match

Common Use Cases

  • Form validation
  • Contact form input checking
  • Email parsing from text
  • User registration validation

Variations

^[\w.+-]+@[\w-]+\.[\w.]+$

Shorter version using \w shorthand

^.+@.+\..+$

Minimal check (has @ and dot)

Want to test this pattern with your own data?

Open the Regex Tester