Article

What Is Syntax Validation for Email Addresses? Rules, Limits and Examples

By Unlimited Verifier Team ·

Flow diagram showing an email address passing through syntax validation checks for a single @ sign, dot placement and domain labels before failing or continuing

Summary

Syntax validation checks whether an email address follows the formatting rules in RFC 5321 and RFC 5322, such as a single @ sign, legal dot placement and valid domain labels. It runs without any network request, so it is the fastest stage of email verification, but it cannot confirm that a mailbox exists or accepts mail.

Syntax validation checks whether an email address follows the grammar in RFC 5321 and RFC 5322: one @ sign, a local part of up to 64 characters and a well-formed domain. It makes no network request, which makes it the cheapest stage in any email verification workflow, but it cannot confirm that a mailbox exists.

That gap explains most of the confusion. A string can be perfectly formed and still undeliverable, and a typo can look entirely plausible. This guide covers the rules, what they catch in real lists, what they miss, and how to run them as one stage of a larger process.

Quick answer

What exactly does syntax validation check in an email address?

A syntax check tests the address string against the grammar in RFC 5322 (the message format) and RFC 5321 (SMTP). It splits the address at the @ into a local part (the mailbox name) and a domain. RFC 3696 explains these rules in plain language and lists the mistakes validators commonly make. For the message-format detail, see what RFC 5322 email syntax is.

Component Rule Passes Fails
Separator Exactly one unquoted @ jane@example.com jane@@example.com, jane.example.com
Local part length 1 to 64 octets (RFC 5321) jane.doe@example.com A 65+ character local part
Dots in local part Cannot lead, trail or repeat unless quoted jane.doe@example.com .jane@, jane..doe@
Unquoted characters Letters, digits and symbols such as + - _ . ' ! jane+news@example.com jane doe@example.com (space)
Domain length Up to 255 octets; labels 1–63 characters mail.example.co.uk A label of 64+ characters
Label characters Letters, digits, hyphens; no hyphen at a label's start or end my-shop.com -shop.com
Whole address About 254 characters (the 256-octet path limit includes angle brackets) Typical addresses Overlong strings

Three subtleties trip people up:

Bottom line: Syntax validation is a grammar check against RFC 5321 and RFC 5322. It should be strict about structure and tolerant of anything the RFCs permit.

Why does syntax validation matter for deliverability and compliance?

Syntax validation matters because a malformed address can't be delivered. It becomes a hard bounce, and hard bounces count against your sending reputation. A receiving server signals this with enhanced status code 5.1.3, "Bad destination mailbox address syntax," defined in RFC 3463. A bare 501 reply means a syntax error in a command argument.

Hard bounces feed the bounce rates that ESPs and mailbox providers monitor. Each platform sets its own threshold, and most don't publish exact figures. The safe approach is to keep malformed addresses out before any send, rather than learning the threshold during a review.

On compliance, GDPR Article 5(1)(d) requires personal data to be accurate and, where necessary, kept up to date. A syntax check at the point of capture is a cheap control for that accuracy principle, and it belongs in your email verification compliance and hygiene practice. It proves nothing about consent, though.

Bottom line: A syntax failure is a bounce you can predict. Catching it at capture costs almost nothing compared with a deliverability review.

What kinds of errors does syntax validation catch in real lists?

Most syntax failures are created by your data pipeline rather than by subscribers mistyping. They come from exports, CRM merges, copy-paste from inboxes and forms that don't trim input. The common patterns are:

Sort failures by source. They usually cluster in one import, one form or one export. If a single source produces most of the errors, fixing that source prevents the next batch. Cleaning the file only treats the symptom.

Bottom line: Most syntax errors originate in your data pipeline, so the durable fix is upstream.

What can syntax validation not tell you?

A syntax pass is necessary for delivery but not sufficient. Syntax validation can't tell you:

Bottom line: Syntax is a gate, not a verdict. Pass it, then run the later checks.

How does syntax validation differ from full email verification?

Syntax validation is the first of four layers. Each later layer asks a harder question and costs more time, because it needs a DNS lookup or a live SMTP conversation.

Layer Question it answers Network needed? Example failure
Syntax Is the string legal under RFC 5321 and RFC 5322? No jane..doe@example.com
Domain Does the domain exist in DNS? Yes (DNS) jane@no-such-domain-xyz.com
MX Does the domain list servers that accept mail? Yes (DNS MX lookup) A website domain with no MX records
Mailbox (SMTP) Does the receiving server accept this recipient? Yes (SMTP) An address for an employee who has left
Flags Is it catch-all, role-based or disposable? Varies info@, or a throwaway inbox provider

A missing MX record isn't always fatal. RFC 5321 allows delivery to fall back to an address record when no MX exists, so validators treat a missing MX as a risk signal rather than an automatic reject. The mailbox layer is the slow one. Some providers' servers respond slowly or limit checks, which is why some domains verify more slowly than others.

Bottom line: Syntax tells you whether the address is legal. Only the later layers tell you whether it can receive mail.

How does a syntax check work, step by step?

A reliable checker normalises the string, splits it at the @, validates each part against the grammar limits and returns a reason for every failure, not just a yes or no.

  1. Normalise. Trim leading and trailing whitespace, remove a mailto: prefix and strip invisible characters.
  2. Split on the @. Require exactly one unquoted @. Zero, or two or more, fails.
  3. Check the local part. Length must be 1–64 octets. Only permitted characters are allowed unless the part is quoted. No leading, trailing or consecutive dots outside quotes.
  4. Check the domain length. The whole domain must be 255 octets or fewer, and each label 1–63 characters.
  5. Check label characters. Allow letters, digits and hyphens. No hyphen at either end of a label.
  6. Convert internationalised domains. Map Unicode labels to their ASCII xn-- form before checking.
  7. Require a dot and a sensible top-level domain. Most validators require at least one dot, because a bare single-label domain is rarely routable on the public internet. RFC 3696 advises against all-numeric top-level domains, so reject them. Don't hard-code a short TLD list. The IANA root zone database lists well over 1,000 top-level domains.
  8. Return a reason code. Labels such as "missing @", "double dot in local part" or "label too long" make failures actionable and auditable.

Bottom line: Run the steps in order and log the reason for each failure. Reason counts are what you need when someone asks why a list shrank.

Which syntax validation method should you use?

Use an RFC-aware library at capture and a bulk verifier before sending. The two do different jobs, and most teams need both.

Method Where it runs Catches Misses Best use
Browser type="email" Client Missing @ and obvious format errors Quoted and non-ASCII forms, nonexistent domains; users can bypass it Instant hint on a form
Hand-written regular expression Your server or script Whatever the pattern encodes Cases the author didn't anticipate; strict patterns reject valid mail One-off filter; avoid as production logic
RFC-aware library (for example, Python's email-validator or PHP's filter_var) Your server Grammar and length limits; IDN handling varies by library Domain existence, unless you enable the library's deliverability option Signup forms and backend validation
Bulk verifier (syntax, domain, MX, SMTP mailbox) Vendor service Syntax plus domain, MX and mailbox results Consent and engagement Cleaning lists before a send or migration

The core tradeoff is strictness against tolerance. A pattern that is too strict rejects real customers and costs signups. One that is too loose lets typos through and costs bounces. Libraries that implement the RFC grammar avoid most of both problems, which makes them a better default than a regex copied from a forum.

For full services, the best email verification tools comparison and how to choose an email verifier explain what to compare. For a bulk tool, the features that matter for syntax work are the Valid, Risky and Invalid split and the export options. Unlimited Verifier sorts results into those three buckets, flags catch-all, disposable and role-based addresses, and exports CSV, Excel or JSON. Its verification engine is open source at github.com/unlimitedverifier/free-email-verifier, so you can read the code and test it against your own addresses.

Bottom line: Use an RFC-aware library at capture and a bulk verifier before sending. Don't rely on either alone.

Why do validators reject addresses that are actually valid?

Many false rejections trace back to a few regex habits:

Spaces are a related trap. A space is legal only inside a quoted local part, so jane doe@example.com should fail, but a checker should trim leading and trailing spaces before deciding.

The browser rule is a deliberate simplification. The WHATWG HTML Living Standard defines a "valid e-mail address" for input type="email" that accepts a restricted character set and excludes quoted local parts and non-ASCII characters. That is a sensible form hint, but it is not the full RFC grammar, and it shouldn't be your list-cleaning rule.

Reject only what the grammar forbids. Flag unusual-but-legal forms for review, and keep your reject list short and documented.

Bottom line: A rejected valid address is a lost subscriber, so err toward accepting legal forms and flagging the rest.

How do you run syntax validation on a list?

This walkthrough cleans a spreadsheet export in Excel, then runs the full check on Unlimited Verifier.

  1. Export and keep a copy. Export contacts as CSV with the email column and any engagement fields you need. Save an untouched copy first.
  2. Strip invisible spaces. In column B, enter =TRIM(SUBSTITUTE(A2,CHAR(160),"")) and fill down. This removes non-breaking spaces, then trims ordinary leading and trailing spaces. CHAR codes depend on the system's character set, so check a few rows with known problems before trusting the column.
  3. Count the @ signs. In column C, enter =LEN(B2)-LEN(SUBSTITUTE(B2,"@","")) and fill down. Every row should return 1. Filter for 0 or 2 or more and fix those rows.
  4. Split multi-address cells. Filter for semicolons, commas or line breaks in column B. For a handful of rows, copy each address onto its own row by hand. For more than a few dozen, a short script is faster.
  5. Lowercase for matching. In column D, enter =LOWER(B2), fill down, then use Data > Remove Duplicates on column D. Column A keeps your original values.
  6. Sign up for free. Sign up for free. The Free plan covers 25 lists a month, each up to 150 emails, plus 750 deep verifications a month. A 500-row list therefore needs four Free lists (150, 150, 150 and 50), so plan your splits in advance.
  7. Upload a clean file. Paste the cleaned column D as values into a new sheet and save it as CSV. On the Upload and verify a list page, CSV and Excel files up to 10MB are accepted, and the email column is detected automatically. Use Pro for lists above 150 emails. Pro accepts lists of up to 25,000 emails each.
  8. Read the three buckets. Valid addresses are safe for sending. Invalid addresses should be suppressed. Risky addresses, such as catch-all, disposable and role-based ones, should be held back. For catch-all handling, see catch-all email verification.
  9. Export and save the counts. Export as CSV, Excel or JSON. Free keeps results for 24 hours and Pro for 30 days, so export before the window closes and store your summary counts.
  10. Re-import Valid contacts and suppress Invalid ones. There are no native ESP, CRM or Zapier integrations, so re-import the file manually or call the API from your own script.

To check one address, such as a VIP customer who came back Risky, use the free email checker.

Bottom line: Clean the file before upload, count @ signs, split what needs splitting, verify in batches that fit your plan, and export results before the retention window closes.

Worked example: how many rows survive syntax checks in a 48,000-row list?

The scenario is illustrative and the percentages are hypothetical, but the arithmetic and plan limits are real. A SaaS company has 48,000 rows from a webinar export, a CRM merge and a signup form.

  1. Remove exact duplicates: 48,000 − 2,150 = 45,850 unique rows.
  2. Pre-clean whitespace: 1,260 rows had leading, trailing or non-breaking spaces. A strict checker would fail them, but they are real addresses. Cleaned first, they pass.
  3. Syntax failures after cleaning: 812 rows (missing @ signs, doubled dots, multi-address cells, mailto: prefixes). That is 812 ÷ 45,850 = 1.77%. If these had reached a sending platform, most would likely have hard-bounced.
  4. What skipping pre-cleaning would have shown: 812 + 1,260 = 2,072 failures, which is 2,072 ÷ 45,850 = 4.52%. The 1,260 real subscribers would also have been discarded. This assumes no row has both problems.
  5. Rows passing syntax: 45,850 − 812 = 45,038.
  6. Splitting for Pro: 45,038 ÷ 25,000 gives two lists, of 25,000 and 20,038. Pro costs $29 a month, or $25 a month billed annually.
  7. The same rows on Free: 45,038 ÷ 150 = 300.25, so 301 lists. Free allows 25 lists a month, so 301 ÷ 25 = 12.04, which means 13 months of Free allowances. Compare email verification pricing against your real list size, not a headline rate.
  8. Budgeting the checks: Standard verification is unlimited on every plan. Pro includes 25,000 deep verifications a month, which covers only 25,000 of the 45,038 rows. Spend deep checks first on recent engagers and Risky addresses.

Bottom line: Pre-cleaning moved the reported failure rate from 4.52% to 1.77% and saved 1,260 addresses, so it always runs before verification.

How do you add syntax checks to signup forms?

Use three layers, each with a different job:

  1. Browser hint. type="email" gives instant feedback. It is not enough on its own, because scripts can bypass it.
  2. Server-side syntax check. Run an RFC-aware library on every submission. Don't rely on the browser alone.
  3. Asynchronous verification. Teams running email verification for ecommerce and SaaS can add email verification API and automation to check domain and mailbox status after the syntax gate. Real-time patterns are covered in real-time email validation.

Unlimited Verifier's API supports single-email checks and bulk requests of up to 10,000 emails per request. API access is included on Pro, which covers 100,000 emails a month. The Free plan does not include API access, so use the Email verification API once you're on Pro.

For the user experience, don't block people over a typo. Keep a short list of common typo domains and suggest a correction, such as "Did you mean gmail.com?" Let the user confirm, and keep legal forms such as plus addresses.

Bottom line: Validate syntax on the server, suggest corrections rather than rejecting typos, and add domain and mailbox checks behind the form.

What are the most common syntax validation mistakes?

Bottom line: Most mistakes come from trusting one check, skipping the logs or fixing the file instead of the source.

How we compared (and limitations)

This article is based on public documentation: RFCs 5321, 5322, 3696 and 3463, the WHATWG HTML Living Standard, the IANA root zone database, the text of GDPR Article 5, and the published documentation for the libraries named above. We have not run controlled tests of these libraries or tools, and we have not benchmarked them against a sample list.

The worked example uses hypothetical figures. The plan limits are Unlimited Verifier's published facts: 25 Free lists a month of up to 150 emails each, Pro lists of up to 25,000 emails, 25,000 deep verifications a month on Pro, and 100,000 API emails a month on Pro. Check current pricing before budgeting. The company states 99.5% accuracy for deep verification. That is its own figure, not an independent benchmark. Library behaviour changes between versions, so test any library against your own addresses before relying on it.

Worked syntax check

Input Result Reason
jane.doe@example.com Pass One @, legal dots, valid labels
jane..doe@example.com Fail Repeated dot in local part
jane@@example.com Fail Two unquoted @ signs
jane doe@example.com Fail Unquoted space
jane@-example.com Fail Domain label starts with a hyphen
jane+news@example.com Pass Plus sign is legal in local part

Frequently asked questions

Does syntax validation confirm an email address exists?

No. Syntax validation only checks whether the string follows the formatting rules in RFC 5321 and RFC 5322. It makes no network request, so it cannot tell whether a mailbox exists, whether the domain accepts mail, or whether the owner is reachable. Those checks require DNS, MX and mailbox-level verification.

What is the maximum length of an email address?

An email address is generally limited to about 254 characters in total. RFC 5321 sets a 256-octet limit on the SMTP path, which includes angle brackets, so the usable address is slightly shorter. The local part is capped at 64 octets and each domain label at 63 characters.

Can an email address contain spaces?

Not unquoted. A space in an address such as jane doe@example.com is invalid. Quoted local parts like "jane doe"@example.com are technically legal under RFC 5321, but they are rare and many providers reject them, so most validators treat them as suspicious.

Is a + sign allowed in an email address?

Yes. The plus sign is a legal character in the local part, so jane+news@example.com passes syntax validation. Many providers support plus addressing for filtering, but some forms reject it, so check whether your validator is set to accept it.

Should I lowercase email addresses before validating?

Lowercasing is a sound matching convention. RFC 5321 technically allows the local part to be case-sensitive, but large consumer providers generally treat it case-insensitively. The domain part is always case-insensitive, so normalising to lowercase avoids duplicate records.

What is the difference between syntax validation and email verification?

Syntax validation is one stage of email verification. It checks format only. Full verification adds domain checks, MX record lookups, mailbox-level checks and risk signals such as disposable or role-based addresses. Syntax is the cheapest stage and should run first.

Why do valid-looking emails still bounce?

A well-formed address can still be undeliverable if the mailbox was closed, the domain has no working mail server, or the address was mistyped with a real but wrong domain. Syntax validation cannot detect these cases, which is why it should be paired with domain and mailbox checks.

Where should syntax validation run in a signup form?

Run it in the browser for fast feedback and again on the server before storing the address. Client-side checks improve user experience, but server-side validation is required because client checks can be bypassed.

Do I need to validate the email format with a regular expression?

A simple regular expression can catch obvious errors, such as a missing @ or spaces. However, full RFC-compliant patterns are very complex and many are overly strict or permissive. Many teams use a library that implements the RFC rules and then add a basic sanity check.

Cut Bounces and Protect Your Sender Reputation With Unlimited Email Verification

Every invalid address you send to hurts your sender reputation and your inbox placement. Verifying your list before each send means fewer bounces, healthier deliverability, and a predictable cost. With Unlimited Verifier, standard verification is unlimited on every plan, with no per-email fees.

Unlimited Verifier checks syntax, domain, MX records and the SMTP mailbox. It also detects catch-all domains and flags disposable and role-based addresses. Export a CSV from your email platform or CRM, upload and verify the list, then re-import the clean results. You can also automate checks with the email verification API.

Free Pro
Price $0 $29/month ($25/month billed annually)
Lists 25 a month, up to 150 emails each Unlimited, up to 25,000 emails each
Deep verifications 750 a month 25,000 a month
API access No Yes (100,000 emails a month)
Result retention 24 hours 30 days

Why teams choose Unlimited Verifier

Unlimited Verifier states 99.5% accuracy for deep verification.

Create a free account and verify your next list before you hit send.

Want to test a single address first? Try the free email checker.