Credit Card Validator

Validate a card number with the Luhn check and detect its brand.

Runs instantly in your browser — results update as you type.

How do I check if a card number is valid?

A card number can be checked for typos with the Luhn algorithm, a checksum built into every payment card number, and its brand can be identified from its first digits. This confirms the number is well-formed — not that the account exists or has funds.

The Luhn check, step by step

  1. Starting from the rightmost digit, double every second digit.
  2. If a doubled digit is greater than 9, subtract 9.
  3. Add all the digits together.
  4. If the total is divisible by 10, the number passes.

The check catches almost all single-digit typos and most swapped adjacent digits, which is why payment forms use it before sending a number to the bank.

Brand detection

BrandStarts withLength
Visa413–19
Mastercard51–55, 2221–272016
American Express34, 3715
Discover6011, 644–649, 6516–19
JCB3516–19

Privacy

Validation happens entirely in your browser; the number is never sent to our server. Still, avoid typing real card numbers into websites you do not trust.

Developers can generate Luhn-valid test numbers with the Credit Card Generator.

Frequently asked questions

Does a valid result mean the card is real?

No. It only means the number is correctly formed. Only the issuing bank can confirm an account exists and is active.

Is my card number sent anywhere?

No. The check runs entirely in your browser.

What does the Luhn check detect?

It detects most typing mistakes, such as a single wrong digit or two swapped neighbouring digits.