Luhn Algorithm Checker
The check digit behind card and IMEI numbers.
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
- Paste the numbers. One per line. Spaces and hyphens are ignored.
- 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?
What is the algorithm actually doing?
What errors does it catch?
What else uses Luhn?
Is it safe to type a real card number here?
Last updated