Luhn Algorithm Check

Checks card numbers, IMEIs, and other numbers with the Luhn algorithm, computes the check digit, and shows the calculation step by step.

Spaces, hyphens, and periods are allowed. The number is not sent anywhere.

The Luhn algorithm catches typos: one wrong digit and almost any swap of two adjacent digits. The only swap it misses is 09 and 90. Bank card numbers and phone IMEI numbers are checked with it.

A passing check only means the number is written without a typo. Whether the card actually exists, the algorithm cannot tell: a number made of all zeros passes the check too.

Check digit and error search

Given a number without its last digit, the tool calculates the check digit. If a number fails the check, the tool shows the swaps of adjacent digits that make the number valid. Which exact digit is wrong, the algorithm cannot say: a single wrong digit can be corrected at any position in the number.

Rate this tool

Help us get better

Other tools