Check Digit Atlas

Check digits · 3,800,668 mutations tested

Your bank card cannot see this typo.

Swap any two digits that sit one apart, and the Luhn checksum guarding every card payment on earth is mathematically incapable of noticing. Not most of the time. Every time.

Typed
Meant

Both pass the Luhn check

100%of jump transpositions undetected by Luhn, across 25,195 tested
2of ten schemes caught every error thrown at them
0 9the single adjacent swap Luhn cannot see, confirmed across all 90 digit pairs

A check digit is arithmetic hidden in an identifier so that a mistyped one fails to add up. Your card, your books, your car, your patient record and every shipping container in the world carry one. They are not equally good, and the differences are not small.

This page brute-forces the question. For ten real schemes, we generated valid identifiers and injected every classical transcription error at every position — then counted how many passed validation anyway.


Why the hole exists

Luhn weights alternate. Two apart means identical.

Luhn doubles every second digit from the right. Two positions that sit one apart therefore fall on the same side of that alternation — both doubled, or neither. Swap them and every term in the sum is unchanged, so the total is unchanged, so the check digit is unchanged.

It is not a bug or an implementation slip. It is a direct consequence of the weighting, and it means the error class is invisible by construction. EAN‑13, which guards every barcode and every ISBN printed since 2007, alternates weights 1 and 3 and has exactly the same hole.

The atlas

What each scheme actually catches

Every figure is a measured miss rate: the share of injected errors that still validated. Lower is better; zero means nothing got past.

Undetected error rate by scheme and error type. 2,000 valid identifiers per scheme, every error injected at every position.
Scheme Single
character
Adjacent
swap
Jump
swap
Twin
error
Undetected: none more →

Two schemes let nothing through: IBAN and the Australian tax file number. IBAN spends two check digits and a modulus of 97 on the problem, which is why it costs more and catches more. The TFN manages it with nine digits and a table of weights.

Both of them beat the number on your bank card.


Collisions in the wild

Two valid identifiers, one typo apart

Each pair below was produced by the run. Both strings pass their scheme's own validation, so no amount of checking the check digit will tell them apart.

The VIN row deserves its own note. Its transliteration maps several letters onto the same value — A, J both count as 1; B, K, S all count as 2 — so substituting one for another cannot change the checksum. That is why a scheme stamped on every road vehicle misses 7.5% of single-character errors, the worst single-error rate here.


Try it

Find the typos your own number can hide

Paste any identifier — a card number, ISBN, container number, IBAN, VIN. It is checked entirely in your browser and never leaves the page.