uCheckeruChecker

Email typo detection

Typo detection is a validator feature that spots likely input errors in an email address and offers a correction. Instead of silently rejecting user@gmial.com, the system asks: "Did you mean gmail.com?"

How common are typos?

More common than most teams expect. Validation services report that 2–4% of addresses collected through subscription forms contain errors. On a list of 100,000 contacts, that is 2,000–4,000 lost subscribers, all of whom intended to sign up.

Most typos land in the domain, not the local part. People type "gamil" for "gmail", "ynadex" for "yandex", "hotmial" for "hotmail". Errors in the local part (the username before the @) are harder to catch because the validator has no way to know what the correct spelling should be.

How it works

The basic approach compares the domain the user typed against a list of known mail providers. The algorithm computes the edit distance between the typed domain and each domain in the list. A small distance, typically one or two character changes, is treated as a likely typo, and the closest match is suggested.

Most implementations use Levenshtein distance or Damerau-Levenshtein distance, which also accounts for transpositions of adjacent characters ("amil" vs "mail"). The threshold is almost always capped at 1–2 edits. At distance 3 or more, the match is probably coincidental, and suggesting it would confuse more users than it helps.

Better systems also weight substitutions by keyboard layout proximity. Swapping "a" for "s" is a plausible slip; swapping "a" for "p" is not. When multiple candidates are equally close in edit distance, keyboard proximity helps pick the better suggestion.

Common typo patterns

gmial.com→ gmail.comgamil.com→ gmail.comgmal.com→ gmail.comynadex.ru→ yandex.ruyanex.ru→ yandex.ruhotmial.com→ hotmail.comoutloo.com→ outlook.commal.ru→ mail.ru

Where to apply it

The right place for typo detection is a client-side form, triggered when the user leaves the email field. A small suggestion appears next to the field: "Did you mean gmail.com?" with a one-click fix.

The suggestion should not be pushy. A person may deliberately use a rare domain that happens to look like a popular one. There should always be a clear "No, keep it" option — forcing corrections will reject valid addresses.

In bulk validation, typo detection works differently. The validator flags the address as a probable typo and includes a suggested correction. The decision to change anything stays with the operator. Auto-correcting addresses in a database is risky: you might silently reassign someone's account to the wrong inbox.

Typos in the local part

Domain typos are detectable because the reference list is finite. Username typos are not, because there is no authoritative list of correct usernames. The only signal available is an SMTP response. If jsmth@gmail.com returns a 550 and the domain is otherwise healthy, the validator can note a likely typo in the local part — but it cannot suggest what the correct spelling is.

Doubled characters are a separate case. People accidentally press a key twice: userr@mail.ru instead of user@mail.ru. Some validators try removing duplicate characters and re-checking, but this breaks on legitimate addresses — "oo" in "yahoo" is not a typo.

Open-source options

On the frontend, mailcheck.js compares the typed domain against a bundled list and shows a suggestion. The library has not been actively maintained in years, but the logic is simple enough to fork and update with your own domain list.

On the backend, the Python email-validator package handles syntax checking but does not include typo detection. For the full chain — syntax, typo detection, DNS, and SMTP — a validation API is usually faster to integrate than building each layer from scratch.

uChecker detects typos in the domain part of an address and returns a suggestion in the did_you_mean field. Use it in real-time form validation to recover subscribers who mistype their domain by a single character.

email typo detectiondomain suggestionemail autocorrectdata qualityemail validation
← Glossary