Luhn Checker
Paste any digit string — a card number, IMEI, or account ID — and this checker runs the Luhn (mod 10) algorithm in your browser, showing whether the checksum passes and, if it fails, which final digit would fix it.
About this tool
The Luhn algorithm doubles every second digit counting from the rightmost position, subtracts 9 from any doubled value over 9, adds everything up, and requires the total to be a multiple of 10. It reliably catches single mistyped digits and swapped adjacent digits, which is why card networks, IMEI numbers, and several ID schemes rely on it.
How to use
- Paste the digit string: Enter a card number, IMEI, or any digit sequence with a trailing check digit.
- Click Check: The tool strips spaces and hyphens, then runs the Luhn mod-10 algorithm.
- Read the checksum: See whether the total is a multiple of 10 and how many digits were processed.
- Fix a failing digit: If it fails, the tool shows which final digit would make the checksum pass.
Common use cases
- Sanity-check a card number before typing it into a form or seeding a test database.
- Verify a phone's IMEI or a tracking number that ends in a Luhn-style check digit.
- Walk through the running checksum to learn or teach how the mod-10 algorithm works.
Tips
- Spaces and hyphens are stripped automatically, so paste a number exactly as printed.
- A passing Luhn check only proves internal consistency, never that the account or device is real.
FAQ
What exactly does the Luhn algorithm check?
It doubles every second digit from the right, subtracts 9 when a doubled value exceeds 9, sums every digit, and requires the total to be divisible by 10.
Does a valid Luhn result mean the card is real?
No. Luhn only confirms the digits are internally consistent; it says nothing about whether the account or device actually exists.
Is my number sent anywhere?
No. The checksum runs entirely in your browser and nothing you type is transmitted.
Where else is Luhn used besides credit cards?
Phone IMEI numbers, Canadian Social Insurance Numbers, and several national ID and tracking-number formats all use a Luhn check digit.