All tools · Utilities

Card Validator

Luhn check and card type for an account number.

Free to use, no sign-up required. Card Validator is one of 198 tools built into Xenition, alongside a chat that can use them for you.

Checks whether a card or account number is well formed by running the Luhn checksum, and names the likely card network from its first digits. It helps catch typing mistakes before a number is submitted.

How to use Card Validator

  1. Type or paste the number; spaces and dashes are ignored.
  2. Keep typing until at least 12 digits are entered, when the check runs automatically.
  3. Read Valid format or Invalid format, and the detected network.

How it works

Luhn: starting from the rightmost digit, double every second digit and subtract 9 from any result above 9, then add everything up. The number passes if the total is a multiple of 10. The network is guessed from the prefix only: 4 is Visa, 51–55 or 22–27 is Mastercard, 34 or 37 is American Express, 6011 or 65 is Discover, and anything else is Unknown.

Example

4111 1111 1111 1111, a published test number, sums to 30 under Luhn, so it shows Valid format · Visa. Changing the last digit to 2 makes the total 31, so it shows Invalid format.

Questions about Card Validator

Does a valid format mean the card is real?

No. Passing the Luhn checksum only means the digits are internally consistent. It does not show that the card exists, is active, belongs to anyone or has funds; only the issuing bank can confirm that.

What kind of mistakes does the Luhn check catch?

Any single mistyped digit, and most swaps of two neighbouring digits. That is why checkout forms use it to flag typos before sending a payment.

Use it from chat

You do not have to open Card Validator to use it. Ask Xenition in plain language and it runs the right tool, then carries the answer into whatever you are working on — a document, a spreadsheet, a deck.

Related tools