How to Validate an Email Address
Syntax validation can prove an address is malformed but never that it exists. Keep the check deliberately loose — one at sign, something before it, a dot-containing domain after it — because strict patterns reject valid addresses such as those with plus tags or apostrophes. The only genuine verification is sending a message and having someone act on it.
Email Address Validator
Check a list of email addresses for syntax errors.
The specification permits far more than people expect: quoted local parts containing spaces, comments in brackets, and apostrophes in ordinary surnames. A regex written to match the full grammar is several hundred characters long and still cannot tell you whether the mailbox exists.
That gap matters commercially. A too-strict pattern silently rejects real customers, and the failure is invisible because the person simply leaves. A loose check that accepts a few malformed addresses costs far less than one that turns away valid ones.
Step by step
-
Check the shape, not the grammar
Require exactly one at sign, at least one character before it, and a domain after it containing a dot. That catches genuine typing errors such as a missing at sign without excluding anything legitimate.
-
Accept the characters people actually have
Plus tags, dots, hyphens and apostrophes all appear in real addresses. O'Brien and user+newsletter@example.com are both valid, and patterns that reject them are a recurring source of complaints.
-
Normalise before storing, not before validating
Trim whitespace and lowercase the domain, which is case-insensitive. Do not lowercase the local part: it is technically case-sensitive, even though most providers ignore that in practice.
-
Check the domain has a mail route
An MX lookup on the domain proves someone has configured mail there, which catches typos such as gmial.com. It says nothing about the specific mailbox, and it does require a network call, so treat it as an optional extra rather than part of form validation.
-
Send a confirmation to verify
A message with a unique link is the only check that proves the address exists and reaches the person who entered it. Everything before this step is a convenience for the user, not evidence for you.
Example
All four of these are valid addresses that over-strict patterns commonly reject.
Valid but often rejected
user+tag@example.com
o'brien@example.co.uk
firstname.lastname@sub.example.museum
user@example.travel
Genuinely malformed
user@@example.com
user@example
plain-text-no-at-sign
Frequently asked questions
What is the correct regex for an email address?
Are plus signs valid in email addresses?
Can an email address contain an apostrophe?
Does an MX record prove the address works?
Should I lowercase the whole address?
Tools used in this guide
All tools →- Email Address Validator Check a list of email addresses for syntax errors. In your browser
- Email Extractor Pull every email address out of a block of text. In your browser
- Regex Tester Test a regular expression and see every match highlighted. In your browser
- DNS Lookup Query A, AAAA, MX, NS, TXT, CNAME, SOA and SRV records. Server-side
Related guides
All guides →Last reviewed .