Orpheus

Luhn Algorithm Checker

The check digit behind card and IMEI numbers.

Options
Identify the card network
Result

Everything is processed in this tab. Nothing you paste is sent anywhere.

Every tool runs entirely in your browser. Your files are never uploaded to a server.

The Luhn algorithm doubles every second digit from the right, subtracts 9 from any result above 9, and sums everything. A valid number totals a multiple of ten — it catches typos, not fraud.

How to use Luhn Checksum Validator

  1. Paste the numbers. One per line. Spaces and hyphens are ignored.
  2. Read the result. Pass or fail, digit count and the likely network.

About validating a Luhn checksum

The Luhn algorithm is a checksum, and understanding what a checksum is for explains everything else about it. It exists to catch transcription errors — a digit mistyped, two digits swapped — at the point of entry, before a request is sent anywhere. A number that fails can be rejected instantly, which saves a round trip and gives the user a useful error rather than a decline. A number that passes has told you nothing except that it is not obviously mistyped. The mechanics are simple enough to do by hand. Starting from the rightmost digit and moving left, every second digit is doubled, and any doubled value above nine has nine subtracted from it, which is equivalent to summing its two digits. Add the whole lot together and a valid number is a multiple of ten. The final digit of a card number is a check digit, chosen when the number is issued precisely so that this works out. Its error coverage is good but not complete: it catches every single-digit error and nearly every transposition of adjacent digits, with the known exception of 09 against 90, which it cannot distinguish. That gap has been documented since the scheme was patented in 1960 and has never been considered serious enough to change, because the alternative schemes cost more arithmetic than the improvement is worth. It is worth saying plainly that Luhn is not a security measure. It is public, trivially reversible, and a valid-looking number can be generated in a line of code — which is exactly why passing it must never be treated as authorisation.

Frequently asked questions

Does passing the Luhn check mean a card is real?
No, and this is the most important thing about it. It confirms the digits are internally consistent, which catches a mistyped or transposed digit. It says nothing about whether the account exists, has funds, or belongs to the person using it — only the issuer can answer that.
What is the algorithm actually doing?
Working right to left, it doubles every second digit and subtracts 9 from any result over 9, then adds everything up. A valid number sums to a multiple of ten. The last digit is a check digit chosen specifically to make that true.
What errors does it catch?
All single-digit errors, and most transpositions of adjacent digits — the common failures when someone reads a number aloud or types it from a card. It misses the transposition of 09 and 90, which is a known blind spot of the scheme.
What else uses Luhn?
IMEI numbers on mobile phones, some national identification numbers, and various account and tracking numbers. It is not cryptographic and was never intended to be — Hans Peter Luhn patented it in 1960 as an error-detection scheme.
Is it safe to type a real card number here?
The check runs entirely in your browser and nothing is transmitted, so technically yes. As a habit it is still better to test with the published test numbers, because typing a real card into any web page is a pattern worth not building.

Last updated