Credit card validator

Check card number format (Luhn) and issuer.

Enter a card number.

Checks format validity only, using the Luhn algorithm. It does not verify whether the card can actually be charged or has been issued, and your input is never transmitted.

AD

A customer types their card number into your checkout form and the payment fails. Was it a typo, or something on the processor's end? A quick format check answers that in a second. This tool runs the Luhn checksum on a card number and reports the likely issuing network based on the leading digits.

How it works

What the check actually does

Enter a number into the box — spaces and hyphens are stripped automatically — and press Check. Two things come back: whether the number passes the Luhn checksum, and an estimate of the issuer plus the digit count.

If you enter fewer than 12 digits the tool stops and tells you so. Real card numbers run 13 to 19 digits depending on the network.

How the Luhn checksum works

Luhn is a simple arithmetic test that catches most single-digit typos and adjacent transpositions:

  1. Start from the rightmost digit and work left.
  2. Double every second digit.
  3. If a doubled value exceeds 9, subtract 9 from it.
  4. Add all the digits together.
  5. If the total is divisible by 10, the number passes.

That last digit of a card number is a check digit chosen specifically to make the sum come out right.

Reading the issuer estimate

The network is inferred from the opening digits, using the ranges each scheme is assigned:

Starts withNetwork
4Visa
51–55, 22–27Mastercard
34, 37American Express
35JCB
30x, 36, 38Diners Club
6011, 65Discover
62UnionPay
9Domestic-only / local scheme

What it cannot tell you

Passing Luhn means the number is well formed, not that the card exists, is active, or has funds. Only the issuer can answer that, through your payment processor. Use this to catch input errors, never as an authorisation check — and do not paste real card numbers into any web page you do not control. The check here runs entirely in your browser and nothing is transmitted.

Terms explained

Luhn algorithm
A checksum formula, also called mod 10, used to catch mistyped identification numbers. Nearly every payment card uses it.
Check digit
The final digit of a card number, chosen so that the whole number satisfies the Luhn test.
IIN / BIN
Issuer Identification Number — the first six to eight digits, which identify the issuing bank and network.
Issuer
The bank or institution that issued the card, as distinct from the network brand printed on the front.
Domestic-only (local)
A card issued for use within one country's own scheme, which typically will not work on international networks.

Frequently asked questions

Does passing this check mean the card is real?

No. Luhn only confirms the digits are internally consistent, so a made-up number can pass it while belonging to no account at all. Whether a card exists, is active, and has available funds can only be confirmed by the issuer through a payment processor.

Why does a valid card of mine fail the check?

The most common cause is a typo — a missing, extra or swapped digit. Check that you copied all digits and that nothing was cut off; if the number is correct as printed on the card and still fails, re-enter it carefully rather than assuming the card is faulty.

Is my card number sent anywhere?

No. The validation runs in JavaScript inside your browser and the number is never uploaded or logged. As a general habit, though, avoid entering live card details into any tool you did not build or do not trust.

Why is the issuer shown as unknown?

The estimate is based on published leading-digit ranges for the major networks. Numbers from smaller regional schemes, prepaid products, or test sequences may fall outside those ranges and come back as unknown even when they pass Luhn.

Can I use this to generate test card numbers?

This tool only validates; it does not generate. For testing a checkout flow, use the sandbox card numbers your payment provider publishes — those are designed to trigger specific success and failure responses safely.

AD