About Luhn Card Number Validator
Testing a checkout form, cleaning a list of test cards or checking a number someone read out over the phone? Type or paste it here. The Luhn checksum is worked out, and if it fails you see which check digit the other digits need. The prefix names the network (Visa, Mastercard, American Express, Discover, JCB, UnionPay and others) and the length is compared with what that network issues.
Paste several numbers, one per line, to check a list at once. Everything is worked out on this page: nothing is stored or sent. There is no need to use a real card; payment providers publish test numbers for exactly this.
How it works
- Spaces, dashes and dots are ignored. Starting from the right, every second digit is doubled (subtracting 9 when that passes 9) and all the digits are added up. The number passes when the total ends in 0.
- If it fails, the same sum over all but the last digit gives the check digit the number should have ended with.
- The leading digits are compared with the prefix ranges each network issues; the most specific match wins, so 6011 is Discover rather than the broader 60 range.
- The length is checked against what that network issues, such as 15 digits for American Express or 13, 16 or 19 for Visa.
Questions
Does a pass mean the card is real?
No. The Luhn check only catches typing mistakes. A number can pass and still belong to no account; only the issuing bank can confirm that a card exists or has funds.
Is it safe to type a card number here?
The number is checked on this page and is not stored, logged or sent anywhere. Even so, use the test numbers your payment provider publishes when you can: you rarely need a real card to test a form.
Why does it say the network is not recognised?
The tool knows the main international networks and a few national ones. Smaller schemes, store cards and newly assigned prefixes may not be listed, but the Luhn check is still correct for them.
Can it check IMEI numbers and other Luhn codes?
Yes. IMEI numbers and some national ID numbers use the same checksum, so the pass or fail result holds for them. Ignore the network and industry lines, which only apply to card numbers.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.