Luhn Algorithm Checker

Validate any number with the Luhn (mod-10) checksum.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Luhn algorithm (mod-10) checker

The Luhn algorithm is a simple checksum invented by Hans Peter Luhn and used to catch accidental typos in identification numbers — credit and debit cards, IMEI device serials, SIM ICCIDs, and many national IDs all carry a Luhn check digit. This tool tells you instantly whether a number passes, and also computes the check digit, which is handy for generating consistent test data.

How it works

Walking the digits right to left:

  1. Every second digit is doubled. If doubling gives a result over 9, subtract 9 (equivalent to adding the two digits).
  2. All the digits are summed.
  3. The number is valid when the total is a multiple of 10.

To find the check digit for a payload (a number without its final digit), the tool computes the Luhn sum as if a 0 were appended, then the answer is (10 − sum mod 10) mod 10.

Example

Check 4539 1488 0343 6467 (a Luhn-valid test card):

  • Doubling every second digit from the right and reducing values over 9 produces a running total.
  • That total is a multiple of 10 → passes the Luhn check.

Now take a payload 7992739871 with no check digit. The Luhn sum of 79927398710 leaves a remainder, and the tool reports the required check digit as 3, so 79927398713 would pass.

What Luhn protects (and doesn’t)

DetectsMisses
Any single wrong digitThe 09 ↔ 90 transposition
Most adjacent transpositionsWhether the account is real
Most twin-digit errorsWhether the card is active

Privacy: the entire calculation runs in your browser. Nothing you type is uploaded, logged, or stored. A pass means the number is internally consistent — never that it belongs to a real, active account.

Ad placeholder (rectangle)