Email Typo Detection: Save Lost Signups with Smart Correction
Between 2% and 8% of users mistype their email address during signup. That's revenue walking out the door. Here's how to catch the typo and keep the user.
MailSentry Team
Email validation experts
TL;DR
- •2-8% of users mistype their email at signup — domain misspellings like gmial.com are the most common, and a simple Levenshtein distance check catches the majority.
- •Show typo corrections as inline suggestions the user can accept, never auto-correct silently — some people legitimately use uncommon domains.
- •Pair client-side typo detection with a server-side validation API for full coverage, and track suggestion acceptance rate to measure impact.
A user lands on your signup page, types their email address in a hurry, and hits submit. They meant jane@gmail.com but typed jane@gmial.com. Your server accepts it — the syntax is technically valid — and fires off a welcome email that will never arrive. Jane waits, gets frustrated, and leaves. You just lost a customer to a typo.
This scenario plays out thousands of times a day across the internet. Studies suggest that between 2 and 8 percent of email addresses entered into web forms contain typos, with domain misspellings being the most common category. Email typo detection intercepts these mistakes in real time and offers the user a corrected suggestion before the form is submitted.
Common Typo Patterns
Most email typos fall into predictable categories:
- Domain misspellings —
gmial.com,gmal.com,gamil.cominstead ofgmail.com. - TLD errors —
yahoo.coninstead ofyahoo.com, oroutlook.cmo. - Transposed characters —
hotamil.cominstead ofhotmail.com. - Double characters —
yahooo.comorgmailll.com. - Missing characters —
yaho.comorgail.com.
Because the pool of popular email providers is relatively small — Gmail, Outlook, Yahoo, iCloud, and Proton account for the vast majority of consumer addresses — you can catch most domain typos with a focused comparison list.
Building a Basic Typo Detector
The core idea is to compute the edit distance between the entered domain and a list of known-good domains, then suggest a correction if the distance is small:
Solve this with MailSentry
8 validation layers, real-time results, sub-50ms response.
Try MailSentry Free →const KNOWN_DOMAINS = [
"gmail.com", "yahoo.com", "hotmail.com", "outlook.com",
"aol.com", "icloud.com", "mail.com", "protonmail.com",
"proton.me", "zoho.com", "yandex.com", "gmx.com",
];
function levenshtein(a: string, b: string): number {
const matrix: number[][] = [];
for (let i = 0; i <= a.length; i++) matrix[i] = [i];
for (let j = 0; j <= b.length; j++) matrix[0][j] = j;
for (let i = 1; i <= a.length; i++) {
for (let j = 1; j <= b.length; j++) {
const cost = a[i - 1] === b[j - 1] ? 0 : 1;
matrix[i][j] = Math.min(
matrix[i - 1][j] + 1,
matrix[i][j - 1] + 1,
matrix[i - 1][j - 1] + cost
);
}
}
return matrix[a.length][b.length];
}
function suggestEmailCorrection(email: string): string | null {
const [local, domain] = email.split("@");
if (!domain) return null;
const lowerDomain = domain.toLowerCase();
if (KNOWN_DOMAINS.includes(lowerDomain)) return null;
let bestMatch: string | null = null;
let bestDistance = Infinity;
for (const known of KNOWN_DOMAINS) {
const distance = levenshtein(lowerDomain, known);
if (distance < bestDistance && distance <= 2) {
bestDistance = distance;
bestMatch = known;
}
}
return bestMatch ? `${local}@${bestMatch}` : null;
}
This function compares the entered domain against known providers and returns a suggestion if the Levenshtein distance is two or fewer edits. It is lightweight enough to run on the client side for instant feedback.
Presenting the Suggestion
How you show the correction matters as much as detecting it. A good UX pattern is an inline hint below the email field:
// React example
const suggestion = suggestEmailCorrection(email);
{suggestion && (
<p className="text-sm text-amber-600 mt-1">
Did you mean{" "}
<button
type="button"
className="underline font-medium"
onClick={() => setEmail(suggestion)}
>
{suggestion}
</button>
?
</p>
)}
Never auto-correct silently. Always let the user confirm. Some people legitimately use uncommon domains, and overriding their input without consent creates a worse experience than the typo itself.
Going Beyond Client-Side Checks
A Levenshtein-based detector handles the most common cases, but it has blind spots. It will not catch typos in less popular domains, and it cannot verify that the corrected address actually exists. Pairing client-side suggestions with a server-side validation API closes these gaps. MailSentry's validation response includes a suggestion field that leverages a much larger domain database plus real-time DNS lookups to recommend corrections with higher confidence.
Measuring Impact
To quantify how many signups typo detection saves, track two metrics:
- Suggestion acceptance rate — How often users click the corrected address. Rates above 60 percent are typical.
- Bounce rate before and after — Compare the hard-bounce rate on your transactional emails before and after deploying typo detection. A meaningful drop confirms the feature is working.
Key Takeaways
Email typos are one of the easiest problems to solve and one of the most expensive to ignore. A simple edit-distance check against popular domains catches the majority of mistakes, and a well-designed inline suggestion nudges users toward the correct address without disrupting their flow. Combine this with server-side validation for full coverage, and you will recover signups that would otherwise vanish into undeliverable mailboxes.
Try MailSentry Free
8 validation layers, sub-50ms response, 1,000 checks/month free.
Get Your Free API Key →