Credit Card Number Validator

Enter a card number to check whether it is mathematically well formed with the Luhn algorithm and to see its likely network. This does not check whether the card is real, active, or has funds, and the number never leaves your browser.

Your card number never leaves this page. There is no server here to send it to, so the number you type is not transmitted, saved, logged, or seen by anyone, not even to check whether it is valid. The Luhn check runs entirely in your browser.

Digits only, with or without spaces. Nothing you type is sent anywhere.

How It Works

The last digit of a card number is a check digit, chosen so that the whole number satisfies the Luhn formula. That built-in relationship is what lets a checkout page reject an obviously mistyped number without asking the bank. It is a test of form, not of whether the card is genuine, and this tool is careful to make that distinction.

The Luhn check works from the rightmost digit moving left. Every second digit is doubled, and if doubling gives a number above 9, you subtract 9 from it, which is the same as adding its two digits together. All the digits are then added up, the doubled ones and the untouched ones alike. If that total is a multiple of 10, the number passes. As an extra, the tool also reads the leading digits to report the likely card network.

Worked Example

Take the sample number 4111 1111 1111 1111, one of the standard test numbers rather than a real card. Doubling every second digit from the right turns seven of the 1s into 2s and the leading 4 into 8, while the remaining digits are left alone. Adding all of them together comes to 30, which is a multiple of 10, so the number passes the Luhn check. Because it starts with a 4, the tool reports the likely network as Visa.

When You Would Use This

Developers building or testing a payment form use Luhn checks to reject bad input before it ever reaches a payment provider, and this tool is a quick way to confirm a test number is well formed. It is also handy for catching a slip when copying a long number down. Whatever the reason, remember that a pass only means the number is correctly formed, and that nothing you enter here is sent anywhere at all.

Frequently Asked Questions

Does a valid result mean the card actually works?

No. A pass means only that the digits are mathematically consistent under the Luhn formula, which is how forms catch a mistyped number. It says nothing about whether the card was ever issued, is active, or has any money on it. Only the bank can tell you that.

Is my card number sent anywhere when I check it?

No. Nothing is transmitted, stored, or logged. The check is done by JavaScript running on your own device, and there is no server behind this page for the number to be sent to, not even to work out whether it is valid. You can close the tab and no trace of the number remains anywhere online.

What is the Luhn check?

It is a simple formula built into almost every card number. Doubling every second digit and adding everything up always lands on a multiple of 10 for a valid number. It is designed to catch single wrong digits and most swapped pairs, not to prove a card is genuine.

How does it know the card network?

Card numbers start with an issuer range that identifies the network. Numbers beginning with 4 are Visa, 51 to 55 and 2221 to 2720 are Mastercard, 34 and 37 are American Express, and there are set ranges for Discover, Diners Club, JCB, UnionPay, and Maestro. The tool reads that prefix and reports the likely network.

Why would a real card fail the check?

Almost always a typo, a dropped digit, or two digits entered in the wrong order. Re-enter the number carefully from the card. If it still fails, the digits as written are not a valid card number.

Should I use my real card number here?

You can, because nothing is sent anywhere, but you do not need to. Any of the standard publicly known test numbers used by payment developers will demonstrate the tool just as well.