Validators5 min read

Email Validation: Check Address Format & MX Records

Validate email address format and check MX records instantly. Verify if an email domain has a mail server.

Get the tool mentioned in this guide in the desktop app:Email Validator

Why validate email addresses?

Email validation catches typos and invalid formats before sending. There are two levels:

1. Syntax validation — Check if the email matches RFC 5322 format ([email protected]). 2. Domain validation — Check if the domain has mail servers (MX records).

Syntax validation is fast and catches obvious typos. MX record checking confirms a domain actually receives email, but requires a DNS lookup and adds latency.

Email address format (RFC 5322)

A valid email has:

  • A local part (username) — alphanumeric and special characters (. _ - + etc.)
  • An @ symbol
  • A domain name — must have at least one dot (example.com).
  • A top-level domain — at least 2 characters (com, org, uk, etc.)

Common invalid patterns: - Missing @ or domain. - Double @ signs. - Spaces or special characters in the local part (unless quoted). - Domain with no dots or invalid TLD.

text
// Valid emails
[email protected]
[email protected]
[email protected]

// Invalid emails
alice@example          (no TLD)
alice.example.com      (no @ sign)
alice@@example.com     (double @)
[email protected]     (empty local part)

MX record checking

An MX (Mail Exchange) record tells the internet how to deliver email to a domain. Every legitimate email domain should have at least one MX record pointing to a mail server.

MyDevTools Email Validator checks if a domain has MX records, confirming it actually accepts email. This is more thorough than syntax checking but requires a DNS lookup from the server.

When to validate and when not to

Always validate: - On signup forms (catch typos before account creation). - Before sending transactional emails (confirmation, reset links).

Consider MX checking: - On critical workflows (newsletter signup, account recovery). - Not needed for every form — syntax validation alone is often sufficient.

Frequently asked questions

What characters are valid in the local part of an email?

Alphanumerics (a-z, 0-9), dots (.), dashes (-), underscores (_), plus (+). Spaces and some special chars require quoting.

Can an email without an MX record still receive mail?

Technically no — without an MX record, mail servers do not know where to send email. Most legitimate domains have MX records.

Is email validation 100% accurate?

No tool is 100% accurate. Syntax validation catches obvious errors. MX checking confirms a domain can receive mail but does not validate the specific user account.

Get Email Validator in the desktop app

Verify and validate email addresses with MX record checks and RFC 5322 syntax validation. Runs fully offline in the MyDevTools desktop app.