Credit Card Validator
Type any card number to run the Luhn checksum and find out whether it is valid, then see which network it belongs to — Visa, Mastercard, American Express or Discover. This free credit card validator works entirely in your browser, so the number never leaves your device.
What is a credit card validator?
A credit card validator checks a card number for two things: whether it is structurally plausible and which card network it belongs to. The first test uses the Luhn algorithm, a simple checksum built into almost every card number. Starting from the right, it doubles every second digit, adds together the digits of any result, and then adds the sum of all the digits. If the total divides evenly by 10, the number passes. The Luhn check catches the everyday mistakes that matter most — a single wrong digit or two digits swapped — which is why it is used by card issuers and payment systems the world over.
The second test reads the number's prefix and length to guess the network. Visa numbers start with 4 and are 13, 16 or 19 digits; Mastercard starts with 51–55 or 2221–2720 across 16 digits; and American Express starts with 34 or 37 across 15 digits. A number that passes Luhn and matches a network pattern is a plausible card number, though it is not proof of an active account or available funds.
How to use the credit card validator
- Type or paste a card number, with or without spaces or dashes.
- The Luhn checksum runs instantly and reports whether the number is valid.
- The network field shows the type — Visa, Mastercard, American Express, Discover or unknown.
Example
Enter 4242 4242 4242 4242 and you get Valid — Visa. Change the last digit to 1 (4242 4242 4242 4241) and the check fails, because the Luhn checksum no longer adds up. This is the classic way to tell a plausible number from a genuine one.
Common use cases
- Catching typos before a number is submitted to a checkout or payment form.
- Rapidly identifying a card network so a UI can show the correct brand logo.
- Testing payment and form code with published sample numbers.
- Filtering obviously impossible numbers at the front of an entry form.
Pro tips
- The Luhn check only proves a number is structurally valid — never treat it as a guarantee of a real, working card.
- Strip spaces and dashes before checking; this tool does it for you automatically.
- Use known sample numbers like 4242 4242 4242 4242 for safe payment-form testing.
- Check length as well as the checksum — a 15-digit Visa is impossible even if it passes Luhn.
FAQ
What is the Luhn algorithm?
The Luhn algorithm, also called the mod-10 check, is a checksum that validates credit card numbers, bank numbers and other identification numbers. It detects single-digit typos and swapped digits.
Does the validator store my card number?
No. The check runs entirely in your browser, and the number you type is never uploaded, stored or sent anywhere.
What does a valid result mean?
A valid result means the number passes the Luhn checksum and matches the pattern of a real card network. It does not guarantee the account is active or has funds.
Can I tell the card network from the number?
Yes. The first digit and the length reveal the network: Visa starts with 4, Mastercard with 51–55 or 2221–2720, and American Express with 34 or 37.
Why does Amex behave differently?
American Express uses a 15-digit number with a four-digit security code on the front, unlike the 16 digits and the three-digit CVV on the back used by Visa and Mastercard.
Is a Luhn-valid number safe to use?
No. A Luhn-valid number is only structurally plausible. Anyone can generate a number that passes the checksum, so it should never be treated as a real, working card.
What are test card numbers?
Card issuers and payment providers publish numbers like 4242 4242 4242 4242 for Visa that pass the Luhn test and are used to test checkout code safely.
Is my real payment card at risk here?
No. The number is processed only on your device and is never transmitted. Still, it is best practice to avoid entering real financial details into any shared tool.
How many digits should a card number have?
Most modern cards have 16 digits, but American Express uses 15 and some cards run to 19 digits. The validator checks the network-specific length as well as the checksum.
Related tools
Related searches
credit card validator, luhn check, luhn algorithm, credit card number generator, card type checker, visa mastercard amex detector, mod 10 check, valid credit card test, card number checker, bin check
