All tools · Utilities

Luhn Validator

Validate card-style numbers with the Luhn checksum.

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

Checks a card or account number against the Luhn checksum, the check-digit rule used on payment cards and many ID numbers, and shows which card brand the prefix suggests.

How to use Luhn Validator

  1. Enter the Card or account number; spaces and dashes are ignored.
  2. Or tap Visa, Mastercard or Amex to load a standard test number.
  3. Read Luhn check (Valid or Invalid), the digit count and any detected brand.
  4. If it fails, read which last digit would make it pass.

How it works

Starting from the rightmost digit, every second digit is doubled, and 9 is subtracted from any result over 9. All digits are summed, and the number passes when the total is a multiple of 10. The brand is matched from the leading digits, for example 4 for Visa and 34 or 37 for American Express, and an unusual length is flagged.

Example

4242 4242 4242 4242 sums to 80, so it is valid and detected as Visa. Changing the last digit to 1 gives 79, invalid, and the tool says a last digit of 2 would pass.

Questions about Luhn Validator

Does a valid Luhn result mean the card is real?

No. It only means the digits are internally consistent. The check catches any single mistyped digit and most swaps of two neighbouring digits, but it says nothing about whether an account exists.

What is the check digit?

The last digit, chosen so the whole number passes the Luhn sum. For 7992739871 the check digit is 3, giving 79927398713.

Use it from chat

You do not have to open Luhn 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