QuickCheckTools

Credit card validator

Check whether a card number is correctly formed and which network it belongs to. The check runs in your browser, and nothing you type is sent or stored.

Test card numbers

Standard numbers published for testing payment forms. They pass the check but are not real cards and cannot be charged.

NetworkTest number
Visa4242 4242 4242 4242
Visa (debit)4000 0566 5566 5556
Mastercard5555 5555 5555 4444
Mastercard (2-series)2223 0031 2200 3222
American Express3782 822463 10005
Discover6011 1111 1111 1117
JCB3566 0020 2036 0505
Diners Club3056 930902 5904
UnionPay6200 0000 0000 0005

Card number ranges by network

NetworkStarts withLength
Visa413, 16 or 19
Mastercard51–55, 2221–272016
American Express34, 3715
Discover6011, 644–649, 6516–19
JCB3528–358916–19
Diners Club300–305, 309, 36, 38, 3914–19
UnionPay6216–19

Questions

Does a valid result mean the card is real?

No. It means the number is correctly formed: the right length for its network and a check digit that adds up. It cannot tell whether the card was ever issued, is still active or has funds. Only the card issuer can confirm that, when a payment is made.

Is it safe to enter a card number here?

The check runs entirely in your browser and nothing is sent or stored. Even so, you never need to enter a real card to test this tool: use one of the test numbers on this page.

How does the check work?

Card numbers end in a check digit worked out with the Luhn formula (ISO/IEC 7812). Every second digit from the right is doubled, the digits are added up, and the total must divide by 10. Any single mistyped digit breaks it.

How can I tell which network a card belongs to?

From the first digits, called the IIN or BIN. Visa numbers start with 4, Mastercard with 51–55 or 2221–2720, and American Express with 34 or 37. The table on this page lists the main ranges.

What are test card numbers?

Numbers published for developers to test payment forms. They pass the Luhn check but are not real cards and cannot be charged. They only work in a payment provider's test mode.

Why is my number valid but showing a length warning?

Each network uses fixed lengths. For example, American Express cards always have 15 digits. A number with a correct check digit but the wrong length for its network has probably been copied wrongly.