Skip to content

Free · No sign-up · Your address stays in your browser

Email address validator, with MX lookup

Email address

For example: anna.smith+shop@gmail.com

When you click, your browser asks Cloudflare's public DNS about «the domain». The full address is not sent.

A domain that receives mail does not guarantee the mailbox exists. For that, send a confirmation code.

Type an address and see straight away whether it follows the standard's rules (64 characters before the @, 254 in total, dots, quotes, non-ASCII), whether it has a common typo such as gmial.com, and whether it is a disposable address or a plus alias. One click checks whether the domain has MX records to receive mail.

The address is checked in your browser. Only if you click «Check the domain» do we send the domain (what comes after the @) to Cloudflare's public DNS. The full address is never sent anywhere.

What it checks

What this tool checks (and what it does not)

  • Yes, in your browser: that the address follows the RFC 5322 syntax and the RFC 5321 limits: length, dots, quotes, allowed characters and a well-formed domain, including international ones.
  • Yes, in your browser: typos in the most used domains (gmial.com → gmail.com), plus aliases, dots in Gmail, domains reserved for examples and disposable domains from a public list.
  • Yes, on request: whether the domain has MX records, i.e. servers that receive mail. Only the domain is sent to Cloudflare's public DNS.
  • No: whether the mailbox exists. See why we do not try and why no tool can guarantee it.

The only reliable way to know an address works and belongs to the right person is to send it a confirmation code or link. This tool is for the step before that: not storing a mistyped address.

Rules

The rules of an email address: 64 and 254 characters, dots and quotes

An address has two parts separated by the @: the local part (the mailbox name) and the domain. RFC 5322 (section 3.4.1) defines its shape and RFC 5321, the mail transfer standard (SMTP), its limits.

RuleLimitSource
Local part (before the @)64 octets at mostRFC 5321, 4.5.3.1.1
Domain255 octets; each dot-separated label, 63RFC 5321, 4.5.3.1.2; RFC 1035, 2.3.4
Whole address254 characters: the path allows 256 including «<» and «>»RFC 5321, 4.5.3.1.3
Dots in the local partNot first, not last, never two in a row (unless quoted)RFC 5322, 3.2.3 (dot-atom)
Quotes"john smith"@example.com is valid, but if it can be written without quotes, it should beRFC 5322, 3.2.4 and 3.4.1
DomainLetters, digits and hyphens; no hyphen at the start or end of a labelRFC 1123, 2.1
Upper caseThe domain ignores it; the local part may in theory be case-sensitive, though relying on that is discouragedRFC 5321, 2.4
An octet is a byte. A plain letter takes one octet; an accented letter takes two (in UTF-8).

Which characters are allowed before the @

Besides letters and digits, the standard allows these symbols without quotes: ! # $ % & ' * + - / = ? ^ _ { | } ~ and the backtick. So orders+web@company.com or o'neill@company.com are correct addresses, even if some forms reject them. Quotes allow spaces and other symbols too, but almost nobody uses them.

Accents and non-Latin scripts: international domains and SMTPUTF8

In the domain, yes. A domain such as bücher.de travels in its ASCII form, xn--bcher-kva.de (punycode). The tool shows both and queries DNS with the second.

In the local part, it depends on the servers. RFC 6531 (SMTPUTF8) allows non-ASCII characters, but only works if both the sending and the receiving server support it. The tool accepts it with a warning.

MX

Does the domain receive mail? MX records

An MX record is the DNS entry that says which servers receive mail for a domain. When you click «Check the domain», your browser asks Cloudflare's public DNS for it (DNS over HTTPS). Possible results:

ResultMeaning
Has MX recordsThe domain has mail servers. We list them by priority (lowest number first).
No MX, but an IP addressNo MX but an A or AAAA record. The standard says mail then goes to that IP (the «implicit MX», RFC 5321, 5.1). It can receive, though it is unusual.
Null MXA single MX pointing to «.»: the domain explicitly does not accept mail (RFC 7505). example.com is one.
No MX and no IPThe domain exists but has nowhere to receive mail.
Domain does not existDNS says that name is not registered (NXDOMAIN). Almost always a typo.

MX records say the domain can receive mail, not that a given mailbox exists.

Mailbox

Why we do not check whether the mailbox exists

Many verifiers connect to the domain's mail server and start sending a message (an «SMTP probe») to see if it accepts the address. We do not, for four reasons:

  • The standard allows servers not to answer. RFC 5321 (sections 3.5.3 and 7.3) lets servers disable address verification for security; they must then reply 252, which means neither yes nor no.
  • Some domains accept everything (*catch-all*): they say yes to any address and bounce or drop it later.
  • It is intrusive. It starts a delivery nobody asked for, and large providers throttle or block whoever does it often. That is why those tools cap daily checks or ask you to sign up.
  • Your full address would have to go to a server (ours or a third party's). We prefer it to stay in your browser.

If you need certainty, send a confirmation email with a link or code. It is the only thing that proves someone reads that mailbox.

Typos

Common typos: gmial.com, hotmial.com, gmail.con…

Most bad addresses break no rule: they are well-formed but mistyped. anna@gmial.com is valid and will never reach Anna. The tool compares the domain with widely used providers and, if it is very close to one, asks whether you meant that.

TypedProbablyWhat happened
gmial.comgmail.comTwo letters swapped
hotmial.comhotmail.comTwo letters swapped
gmail.congmail.comn is next to m
outlok.esoutlook.esMissing letter
gmail.com.esgmail.comExtra ending
Endings that exist are not «corrected»: hotmail.fr or yahoo.de are real addresses.

Disposable

Disposable and temporary email addresses

A disposable address is created on the spot at services such as Mailinator or YOPmail, with no sign-up, and abandoned within minutes or days. For whoever receives it (a shop, a contact form, a customer list) it means they will not be able to write back.

The tool warns if the domain, or a parent domain, is on the public disposable-email-domains list, maintained by a community on GitHub and released into the public domain (CC0). We use the copy of 21 November 2026, 10,455 domains, unchanged. It is not an official list, so it is shown as a warning.

Aliases

Plus aliases and dots in Gmail

Many providers let you add a «+» and a word before the @: anna+shop@gmail.com reaches anna@gmail.com. Google explains it in its help and Microsoft enables it by default in Exchange Online, though each organisation can turn it off (plus addressing). The standard calls it subaddressing (RFC 5233) but does not require it: elsewhere, «+» may be part of the name.

In personal Gmail accounts, dots do not matter: anna.smith@gmail.com and annasmith@gmail.com are the same mailbox. In work or school Google accounts they do.

Code

Validate an email in JavaScript, Python and Excel (with the regex)

For a form or a customer list. The regular expression checks the usual syntax (no quotes or IP literals) and the code adds the 64 and 254 octet limits, which a regex alone handles poorly. The JavaScript version also looks up MX records over DNS over HTTPS.

email.js · JavaScript
// RFC 5322 syntax (dot-atom) with the RFC 5321 limits.
// No quotes or [IP]: standard-compliant, but almost no sign-up form wants them.
const LOCAL = /^[\w!#$%&'*+/=?^\x60{|}~-]+(\.[\w!#$%&'*+/=?^\x60{|}~-]+)*$/;
const LABEL = /^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i;

function isValidEmail(text) {
  const email = text.trim();
  const at = email.lastIndexOf("@");
  if (at < 1) return false;
  const local = email.slice(0, at);
  // International domain (bücher.de) → punycode (xn--bcher-kva.de)
  let domain;
  try { domain = new URL("http://" + email.slice(at + 1)).hostname; }
  catch { return false; }
  const bytes = (s) => new TextEncoder().encode(s).length;
  if (bytes(local) > 64 || bytes(local + "@" + domain) > 254) return false;
  if (!LOCAL.test(local)) return false;
  const labels = domain.split(".");
  return labels.length > 1
    && labels.every((l) => LABEL.test(l))
    && !/^\d+$/.test(labels.at(-1));
}

// Does the domain receive mail? Only the DOMAIN is sent to Cloudflare's DNS.
async function hasMx(domain) {
  const r = await fetch(
    "https://cloudflare-dns.com/dns-query?type=MX&name=" + encodeURIComponent(domain),
    { headers: { accept: "application/dns-json" } },
  );
  const { Status, Answer = [] } = await r.json();
  if (Status === 3) return "domain does not exist";
  const mx = Answer.filter((a) => a.type === 15).map((a) => a.data);
  if (mx.length === 1 && mx[0].endsWith(" .")) return "does not accept mail (null MX)";
  return mx.length ? mx : "no MX: check the A record";
}
email.py · Python
import re

LOCAL = re.compile(r"[\w!#$%&'*+/=?^\x60{|}~-]+(\.[\w!#$%&'*+/=?^\x60{|}~-]+)*", re.ASCII)
LABEL = re.compile(r"[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?", re.I)

def is_valid_email(text: str) -> bool:
    """RFC 5322 syntax (dot-atom) and RFC 5321 limits (64 and 254)."""
    email = text.strip()
    local, at, domain = email.rpartition("@")
    if not at or not local:
        return False
    try:
        domain = domain.encode("idna").decode("ascii")  # bücher.de → xn--bcher-kva.de
    except UnicodeError:
        return False
    if len(local.encode()) > 64 or len(f"{local}@{domain}".encode()) > 254:
        return False
    if not LOCAL.fullmatch(local):
        return False
    labels = domain.split(".")
    return (len(labels) > 1
            and all(LABEL.fullmatch(l) for l in labels)
            and not labels[-1].isdigit())
# Note: Python's built-in "idna" codec is IDNA 2003; use the idna package for IDNA 2008.
email.xlsx · Excel
Address in A2. Basic check (exactly one @, no spaces or double dots, at most 64
characters before the @ and 254 in total, and a dot in the domain):
=IFERROR(AND(
   LEN(A2)<=254,
   LEN(A2)-LEN(SUBSTITUTE(A2,"@",""))=1,
   SEARCH("@",A2)>1,
   SEARCH("@",A2)-1<=64,
   NOT(ISNUMBER(SEARCH(" ",A2))),
   NOT(ISNUMBER(SEARCH("..",A2))),
   ISNUMBER(SEARCH(".",A2,SEARCH("@",A2)+2))
 ),FALSE)

In Microsoft 365, with regular expressions (REGEXTEST):
=REGEXTEST(A2,"^[\w!#$%&'*+/=?^{|}~-]+(\.[\w!#$%&'*+/=?^{|}~-]+)*@([A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z][A-Za-z0-9-]{0,61}[A-Za-z0-9]$")

Get the domain, to group addresses or spot typos such as gmial.com:
=LOWER(MID(A2,SEARCH("@",A2)+1,254))

In HTML, <input type="email"> already does a basic check in the browser. Use it as a first filter, but validate again on the server.

Fake emails

What if you want to know whether an email is fake?

This tool checks addresses, not messages. A well-formed sender address does not prove a message is legitimate: senders can be spoofed. In Spain, INCIBE's free and confidential helpline, Tu Ayuda en Ciberseguridad, is 017.

FAQ

Frequently asked questions about email validation

How can I tell whether an email address exists?

Reliably, only by sending it a confirmation code or link. Without sending anything you can check that it is well written and that its domain has MX records, which is what this tool does.

What is the maximum length of an email address?

254 characters in total and 64 before the @, per the RFC 5321 limits. They are counted in octets: an accented letter counts as two.

Which characters can an email address contain?

Before the @: letters, digits, dots (not first, last or doubled) and ! # $ % & ' * + - / = ? ^ _ { | } ~ and the backtick. In the domain: letters, digits, hyphens and dots.

Can an email address contain accents?

In the domain, yes: it is converted to punycode. Before the @, SMTPUTF8 (RFC 6531) allows it, but only if both servers support it, so it may bounce.

Which regular expression should I use to validate an email?

One that accepts the standard's characters, not just letters and digits, and checks the domain. There is one in the code section, together with the 64 and 254 octet limits, best checked separately.

What is an MX record?

The DNS entry that says which servers receive mail for a domain. With no MX and no IP address, or with a null MX, a domain cannot receive mail.

What is a disposable email address?

An address created on the spot, with no sign-up, and abandoned soon after. The tool warns if the domain is on the public disposable-email-domains list.

What is a plus alias?

A tag added to your address: anna+shop@gmail.com reaches anna@gmail.com. Gmail and Exchange Online support it; elsewhere it depends on the provider.

Does upper case matter in an email address?

Not in the domain. In the local part the standard lets a server distinguish it, but discourages it and almost none do. Keep the address as you were given it.

Do you send my address anywhere?

No. The address is checked in your browser. If you click «Check the domain», only the domain, what comes after the @, is sent to Cloudflare's public DNS.

About

About this validator

Built by Black Wings, a software studio in Valencia (Spain) working with small and medium businesses. Our validators are free, single-purpose tools that show how we work.

Privacy

What happens to what you type

The address never leaves your browser. Syntax, domain suggestions and aliases are calculated on your device. The disposable-domain list is downloaded whole from this site and searched on your device, so it does not reveal what you type either.

Only if you click «Check the domain» does your browser ask Cloudflare's public DNS, cloudflare-dns.com, about the domain (e.g. gmail.com, never anna@gmail.com). It does not go through our server. According to its privacy policy, Cloudflare does not store your full IP, deletes logs within 25 hours and does not sell or share that data.

We store nothing you type and log none of it in analytics. Details in our privacy policy.

Other validators

More free validators

Need this inside your own software?

Validating IBANs and tax IDs when a customer signs up, checking whole lists or connecting invoicing to the bank: that is the kind of work we do at Black Wings.

Tell us about it