Luhn Validator

Check a card number checksum and name the issuer.

FREE - NO SIGN-UP - RUNS ON YOUR DEVICE

Runs in your browser tab

  • Checksumonly
  • 8issuer ranges
  • 0uploads
  • Testnumbers only
In practice

What you can count on

  • Onlya checksum
    • Says the digits agree, nothing more
    • Never that a card exists
  • 8issuer ranges
    • Named from the opening digits
    • Visa, Mastercard, Amex and more
  • 0uploads
    • Nothing typed here is sent anywhere
    • Nothing is stored
Specification

Luhn Validator at a glance

Input
Digits, spaces and dashes
Check
The Luhn formula
When it fails
Names the correct check digit
Issuer
Named from opening digits
What it cannot tell you
Not whether a card is real
What comes back
Number, digits, issuer, checksum
Price
Free
Account needed
None
Where processing happens
On your device
How to

How to use Luhn Validator

  1. 1

    Type a test number

    A published test number is already loaded. Replace it with the one you are checking.

  2. 2

    Read the result

    A sentence says whether the digits add up, and names the issuer range they fall in.

  3. 3

    Fix a failing digit

    When it fails, the check digit that would have been correct is named, so the typo is easy to find.

Questions

Frequently asked questions

Does a valid checksum mean the card is real?

No. It means the digits are consistent with each other, which is all the formula was designed to catch. Only the issuing bank knows whether a card exists.

Should I type a real card number here?

No. There is no reason to type a real card number into any web page. Use the published test numbers that payment providers give for exactly this.

What is the Luhn formula?

Every second digit from the right is doubled, nines are subtracted from doubled results over nine, and the total has to land on a multiple of ten.

Where does the issuer name come from?

The opening digits and the length. Those ranges are published, so the name is read from the number itself rather than looked up anywhere.

Background

What a checksum is for

The Luhn checksum catches mistyped digits. It says whether the digits agree with each other and nothing more, so use published test numbers rather than a real card.

  • It catches a mistyped digit and most cases of two digits swapped.
  • It is a typing check, not a security measure, and never was one.
  • The same formula validates IMEI numbers and some national identifiers.
  • Payment providers publish test numbers so nobody has to use a real card.

Full specification

Specification of the Luhn Validator tool
InputDigits, spaces and dashes. A published test number is loaded to start with.
CheckThe Luhn formula: every second digit doubled from the right, and the total must reach a multiple of ten.
When it failsThe check digit that would have been correct is named, which points at the typo.
IssuerRead from the opening digits and the length: Visa, Mastercard, Amex, Discover and others.
What it cannot tell youWhether the card exists, who holds it, or whether it has any money on it.
What comes backFour rows: the number, its digit count, the issuer, and whether the checksum adds up. Under 12 or over 19 digits gets its own message.
PriceFree. Supported by clearly labeled ads outside the working area.
Account neededNo.
Where processing happensIn your browser tab. Nothing is uploaded.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS