Email typo detection: how validators catch misspelled addresses
Someone types anna@gmial.com, the form accepts it, and the confirmation email goes nowhere. Typo detection catches input mistakes like this and offers a fix: “Did you mean gmail.com?”
A subscriber who gets one letter wrong is lost without a sound. They think they signed up, you think you have a new contact, and the list now holds an address that will never answer.
Edit distance, briefly
Detection works mostly on the domain, because a domain has something to be compared against. You take a list of popular mail domains and, for the domain the person typed, measure the distance to each one, meaning how many edits turn one string into the other. If the number is small, the domain is treated as a typo and the closest match is suggested.
The classic measure is Levenshtein distance, which counts insertions, deletions and substitutions. The Damerau-Levenshtein variant also counts a swap of two neighbouring letters as a single edit, and that is a common fast-typing slip (gmial for gmail). Thresholds stay low. The mailcheck library defaults to 2, and it uses the sift4 algorithm rather than Levenshtein. Go higher and matches turn coincidental, so the prompt starts “correcting” rare but real domains.
When several candidates tie, keyboard layout helps break the tie. Keys that sit next to each other get confused more often, so “a” for “s” is a likelier slip than “a” for “p”.
Common typos
Do not count on a misspelled domain simply failing an MX lookup. On 16 October 2026, gamil.com, yanex.ru and outloo.com all had MX records, so somebody is accepting mail there. A “does the domain have a mail server” check lets those addresses through; you need a separate list of known typo domains.
Where to prompt
The right moment is in the form, when the person leaves the email field. A line appears under it, “Did you mean gmail.com?”, with a button that applies the fix. Wiring this into a form is covered in the guide to email validation in signup forms.
Keep the prompt gentle. People do use rare domains that look like popular ones, so a “No, keep it” option always has to be there.
With an existing list there is nobody to ask, and rewriting addresses automatically is risky: change the domain and someone's mail goes to a stranger's inbox. Flag the probable typo and leave the decision to a person.
Typos before the @
The local part is harder. There is no reference list of usernames, and a validator cannot know whether j.smith or jsmith is right. All that is left is an SMTP check: if the server answers jsmth@gmail.com with a 550, the mailbox does not exist, but that reply says nothing about the correct name.
Doubled letters are their own case, when a key gets pressed twice: userr@mail.ru instead of user@mail.ru. Stripping repeats automatically is unreliable, since the double o in yahoo is no typo.
Libraries
On the front end there is mailcheck, which compares the domain against a built-in list and shows a suggestion; you can swap in your own domain list. On GitHub, ten years passed between release 1.1.2 in 2016 and the 2.0 beta in September 2026, while npm still serves 1.1.1 as the latest version.
In Python, the email-validator package checks syntax and whether the domain has mail records, but it does not suggest typo fixes. More on it in our look at email validation in Python.
What uChecker does
uChecker keeps a list of several hundred domains, covering known misspellings of popular mail services as well as disposable domains. An address on one of them is marked bad with the reply 550 5.1.1 Email address contains a typographical error. and shows up under syntax errors in the job analytics. Addresses with Cyrillic or accented letters in place of Latin ones get the same reply.
A typo that is not on the list is caught by the regular checks: if the domain has no MX records, the address lands in unknown with a risk flag. We do not try to correct addresses. A suggestion belongs in a form, where a person can confirm it; silently rewriting somebody else's list gets rare company domains wrong and breaks live addresses.
Sources
Typos already in your list show up in the report. Check your list in uChecker. The first 100 addresses are free.
Mark Avrilov · Author
Published
