About the Luhn Validator
The Luhn algorithm is a simple checksum that catches most typing mistakes in long numbers. Payment cards, many phone IMEI numbers and some national ID numbers use it. This tool applies the algorithm to a number you type, tells you whether it passes, guesses the kind of card from the first digits and shows what the last digit should be. Everything runs in your browser and nothing is sent or stored. Type a number, with or without spaces and the Luhn check appears at once, with a few related figures underneath, and you can copy the result with one tap. The sums run in your browser, so nothing you enter is uploaded.
Updated October 2026
How to use the Luhn Validator
- 1Enter a number, with or without spaces.
- 2Pick the units or options from the menus if the Luhn check tool offers them.
- 3Read the Luhn check in the large result box.
- 4Look at the extra rows for related figures.
- 5Press Copy result to keep the answer.
When you need the Luhn check
Developers use it to check input in forms before they send it to a payment service, testers use it to make sure that test numbers are well formed, and learners use it to see how checksums work.
Passing the check does not mean that a number belongs to a real account, or that it has funds. It only means that the digits are consistent. A random number has a one in ten chance of passing.
How the Luhn check is worked out
From the right, double every second digit (subtract 9 if the result is over 9), add all the digits, and the total must be a multiple of 10. The check digit is chosen to make this true. The standard test card number 4111 1111 1111 1111 passes the check and begins with 4, the pattern of Visa cards. Changing its last digit to 2 makes it fail, and the tool tells you that the correct final digit is 1.
Every answer on this page comes from that one rule, so you can check any result by hand with a calculator. The figures shown underneath, such as other units, are conversions of the same answer.
- Pass or fail
- Prefix pattern guess
- Correct final digit
Mistakes to avoid with Luhn check
Never type a real card number into a site that you do not trust. This tool processes the digits in your browser only, but it is safest to test with the public test numbers that payment providers publish. The brand guess uses only the first digits.
On phone and computer
On a phone, type into the boxes one after another and read the Luhn check underneath; Copy result puts it on the clipboard for a message or a note. On a computer the inputs sit on the left and the answer on the right, so you can change one figure and watch the Luhn check move. The luhn validator works the same on both. The Luhn check catches typing slips but does not prove a number is real. See how check digits work with the Check Digit Calculator, test a bank account with the IBAN Validator, and read book numbers with the ISBN Converter.
Features
- Not proof of a real account
- Use test numbers
- One in ten random passes
- Clear messages when the Luhn check inputs make no sense
- Copy the result with one tap
- Private: nothing is uploaded
Frequently asked questions
How do I calculate Luhn check?
From the right, double every second digit (subtract 9 if the result is over 9), add all the digits, and the total must be a multiple of 10. The check digit is chosen to make this true. The standard test card number 4111 1111 1111 1111 passes the check and begins with 4, the pattern of Visa cards. Changing its last digit to 2 makes it fail, and the tool tells you that the correct final digit is 1.
What is the formula for Luhn check?
From the right, double every second digit (subtract 9 if the result is over 9), add all the digits, and the total must be a multiple of 10. The check digit is chosen to make this true. The luhn validator applies it exactly and rounds only the displayed answer to six significant figures.
What is the Luhn algorithm?
A checksum formula created by IBM's Hans Peter Luhn in 1954 to catch accidental errors.
Does passing mean a card is real?
No. It only means that the digits follow the checksum.
Which mistakes does it catch?
Any single wrong digit and most swaps of two neighbouring digits.
Is this luhn validator free and private?
Yes. It is free, needs no account and runs in your browser, so the numbers you type are not uploaded or stored.