Credit Card Validator
Check whether a card number passes the Luhn checksum and identify its brand — Visa, Mastercard, Amex, or Discover.
Private by design: everything runs in your browser — nothing you type is stored, logged, or transmitted anywhere. Note this tool only checks the checksum math and the brand pattern; it cannot tell you whether a card is real, active, or has funds.
How it works
Every major card number embeds a built-in typo detector called the Luhn checksum. Starting from the rightmost digit and moving left, every second digit is doubled; if a doubled value exceeds 9, its digits are summed (equivalently, subtract 9). Add everything up: if the total is a multiple of 10, the number is structurally valid. This catches virtually all single-digit typos and most transpositions — which is why payment forms validate instantly before contacting the bank. The brand comes from the leading digits (the Issuer Identification Number): numbers starting with 4 are Visa, 51–55 and 2221–2720 are Mastercard, 34/37 are American Express, and 6011, 622, 64, or 65 are Discover. Passing the checksum only proves the number could exist; real authorization always happens with the card network.
How to use
- Type or paste the card number into the “Card number” field — spaces and dashes are stripped automatically, so you can paste it exactly as printed on the card.
- The result updates live below the field: “Valid” or “Invalid”, the detected brand, and the digit count (for example, “Valid — Visa (16 digits)”).
- Want to see it work first? The field comes pre-filled with the Visa test number 4111 1111 1111 1111; the hint also suggests the Amex test number 378282246310005.
- Use it to sanity-check numbers you type into payment forms, or test card numbers in your own checkout code — a failed checksum means a typo was made, not that a card was declined.
Frequently asked questions
What does “valid” actually mean here?
It means the digits satisfy the Luhn checksum and match a known brand pattern. It does not mean the card is real, active, or has funds — only the card network can authorize that, which no browser tool can do.
Which card brands are detected?
Visa (numbers starting with 4), Mastercard (51–55 or 2221–2720), American Express (34 or 37), and Discover (6011, 622, 64, or 65). A number from any other issuer can still pass the checksum; it simply shows an unknown brand.
Is my card number sent anywhere?
No. The check runs entirely in your browser with JavaScript — nothing you type is stored, logged, or transmitted anywhere.
Why does a genuine-looking card number fail the check?
Almost always a typo: a single wrong digit, or two digits swapped, breaks the checksum — that is exactly what the Luhn algorithm was designed to catch. Re-type the number carefully; if it still fails, it was copied down wrong.