jsondecode.com logo

Email Address Validator

Validate email addresses for format errors, domain typos, disposable providers, and MX record existence. Bulk mode supports up to hundreds of addresses at once.

ValidInvalidTypo?DisposableNo MX

About Email Validation

This tool performs client-side email validation across four checks: RFC format validation, domain typo detection, disposable provider detection, and optional MX record lookup. No email addresses are sent to any server.

Format validation uses an RFC 5321/5322-based regex. Typo detection matches known misspellings of popular domains (Gmail, Yahoo, Outlook, Hotmail, iCloud, ProtonMail). Disposable detection flags ~40 known throwaway providers. MX record lookup queries Google's DNS-over-HTTPS API to confirm the domain can receive email — if no MX records exist, email delivery will fail.

What each status means

StatusMeaningAction
ValidCorrect format, no known issuesAccept
InvalidSyntax error — missing @, bad domain, etc.Reject and prompt user to re-enter
Typo?Valid format but domain looks like a typoShow correction suggestion to user
DisposableTemporary/throwaway email providerBlock if real emails are required
No MXDomain exists but has no mail servers — undeliverableReject as undeliverable

How MX record checking works

MX (Mail Exchanger) records are DNS entries that specify which mail servers accept email for a domain. A domain without MX records cannot receive email — any attempt to send to it will result in a delivery failure.

This tool queries Google's DNS-over-HTTPS API (dns.google/resolve) directly from your browser — no proxy needed. The lookup is a real DNS query with no caching lag. If the API is unreachable, the tool fails open (assumes MX exists) to avoid false positives.

Email validation in code

JavaScript (browser)

const EMAIL_RE = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$/;
const isValid = EMAIL_RE.test(email);

JavaScript — MX check via DNS-over-HTTPS

async function hasMX(domain) {
  const res = await fetch(`https://dns.google/resolve?name=${domain}&type=MX`);
  const { Status, Answer } = await res.json();
  return Status === 0 && Array.isArray(Answer) && Answer.length > 0;
}

Python

import re
EMAIL_RE = re.compile(r'^[a-zA-Z0-9.!#$%&\'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\.[a-zA-Z]{2,}$')
is_valid = bool(EMAIL_RE.match(email))

Python — MX check

import dns.resolver  # pip install dnspython
def has_mx(domain: str) -> bool:
    try:
        records = dns.resolver.resolve(domain, 'MX')
        return len(records) > 0
    except Exception:
        return False

Go

import "net/mail"
_, err := mail.ParseAddress(email)
isValid := err == nil

PHP

$isValid = filter_var($email, FILTER_VALIDATE_EMAIL) !== false;
// MX check:
$hasMX = checkdnsrr(substr(strrchr($email, '@'), 1), 'MX');

Frequently asked questions

Does this tool verify if the email address actually exists?

No. Format validation checks syntax only — it cannot confirm whether a mailbox exists. The MX check confirms the domain can receive email, but a passing MX check doesn't mean the specific mailbox exists. To verify mailbox existence you need SMTP verification (RCPT TO commands against the mail server) or a third-party verification API.

What is an MX record and why does it matter?

An MX (Mail Exchanger) record is a DNS entry that tells other mail servers where to deliver email for a domain. If a domain has no MX records, there is nowhere to deliver mail — any email sent to that domain will bounce with a 'no route to host' or similar error. Checking MX records is a reliable proxy for 'can this domain receive email at all' without connecting to the SMTP server.

What is the difference between email validation and email verification?

Validation checks format — does the string look like a valid email address? Verification checks deliverability — does the mailbox actually exist and accept mail? Validation is instant and client-side. MX checking is the middle ground: it confirms the domain can receive email without verifying the specific mailbox.

Why does a valid email still bounce?

Format validation and MX checks can't catch: non-existent mailboxes, deleted accounts, full inboxes, catch-all domains that accept but discard mail, or temporary server failures. The only reliable way to confirm an email works is to send a confirmation email and require the user to click a link.

Should I block disposable emails in my app?

Depends on use case. Block them if you need real users for trial abuse prevention, password reset reliability, or billing contact. Allow them if friction reduction is more important — some legitimate users prefer temporary addresses for initial signups. Consider showing a warning rather than hard-blocking.

What is the RFC standard for email addresses?

RFC 5321 defines SMTP (the protocol for sending email). RFC 5322 defines the Internet Message Format including address syntax. In practice, most systems accept a simpler subset: local@domain.tld where local can contain letters, digits, and . ! # $ % & ' * + / = ? ^ _ ` { | } ~ -. Quoted local parts like "user name"@domain.com are technically valid but rarely supported.

If jsondecode.com saved you time, share it with your team

Free forever. No ads. No sign-up. Help other developers find it.