Credit Card Validator

Check card numbers with the Luhn algorithm

Checked in your browser with the Luhn algorithm. The number is never sent or stored.

–
Check many numbers at once
Official test card numbers

How to check if a card number is valid

  1. Type or paste a card number. Spaces and dashes are fine.
  2. The card network (Visa, Mastercard, American Express and others) is detected from the first digits, and the length and Luhn checksum are checked instantly.
  3. Paste a list into "Check many numbers" to validate a batch, or use the official test numbers to try a checkout form.

What the Luhn check tells you

Every payment card number ends in a check digit calculated with the Luhn algorithm, invented by IBM scientist Hans Peter Luhn in 1954. Starting from the right, every second digit is doubled (subtracting 9 if the result is over 9), all digits are added up, and the total must be a multiple of 10. This catches every single-digit typo and almost every swap of two neighbouring digits, which is why online shops can say "invalid card number" before contacting the bank.

The first digits, called the issuer identification number (IIN or BIN), identify the network: 4 for Visa, 51–55 and 2221–2720 for Mastercard, 34 and 37 for American Express. Passing the check only means the number is well-formed. It cannot tell you whether a card exists, is active, belongs to someone or has money on it; only the card issuer knows that, through a real payment authorisation.

This tool is meant for developers testing payment forms, for checking a number you typed yourself, and for learning how check digits work. The number stays in your browser. Never enter someone else's card details into any website.

Does a valid result mean the card is real?

No. It means the number has a correct format and checksum. Only the issuing bank can confirm a card exists.

Is it safe to type my card number here?

The check runs offline in your browser and nothing is sent. Still, there is rarely a reason to check a real card; test numbers work for development.

What are test card numbers for?

Payment providers such as Stripe publish numbers that pass validation so developers can test checkouts without real cards.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.