Credit Card Validator & Luhn Algorithm Checker

Validate a card's Luhn checksum or grab a published Stripe/PayPal sandbox test number.

Type a card number in and this tool runs the Luhn mod-10 checksum every real card issuer bakes into the number itself, guesses which network issued it from the leading digits, and checks the length looks plausible for that network. None of that touches a payment processor, a bank, or any live financial system — it's arithmetic on the digit string you typed, backed by a static list of the actual sandbox test numbers Stripe, PayPal, and Adyen publish for developers.

How to validate a card number

  1. Paste or type the digits into the Card number field; spaces and dashes are stripped automatically, so 4242 4242 4242 4242 and 4242-4242-4242-4242 are read the same way.
  2. Read the Luhn checksum box: Valid means the digits pass the mod-10 check, Invalid means at least one digit is wrong.
  3. Check the detected network and the digit count; an 'unusual' tag means the length doesn't match what that network normally issues.
  4. To test a checkout instead, choose Stripe, PayPal or Adyen under Sandbox test numbers and copy a number with the outcome you need.

Luhn is a checksum built into the number, not a database lookup

The check runs right to left across the digits, doubling every second one and subtracting 9 whenever that doubling pushes a digit above 9, then confirms the total is a multiple of 10. Issuers design real account numbers so this exact arithmetic passes, specifically so that a single mistyped or transposed digit — the most common way someone fat-fingers a card number — gets caught immediately rather than reaching a payment form. It catches typos. It was never designed to catch fraud.

Luhn check worked example: 79927398713

  1. Write the digits out and start from the rightmost one, the check digit 3, which is never doubled.
  2. Double every second digit moving left — 1, 8, 3, 2 and 9 — giving 2, 16, 6, 4 and 18.
  3. Where a doubled result is above 9, subtract 9: 16 becomes 7 and 18 becomes 9, so the doubled digits sum to 2 + 7 + 6 + 4 + 9 = 28.
  4. Add the untouched digits 3, 7, 9, 7, 9 and 7, which total 42, to get 28 + 42 = 70.
  5. Because 70 is a multiple of 10 the number passes; change any single digit and the total stops ending in zero.

Card number prefixes and lengths

These are the exact leading-digit rules and expected lengths the validator uses. Rules are checked in this order and the first match wins; a number that matches none is labelled Unknown and only flagged if it falls outside 12 to 19 digits.

The network name is a guess from the first few digits, nothing more

A leading 4 reads as Visa; ranges in the low 50s or a slice of the 2-series read as Mastercard; 34 or 37 as American Express; 6011 and several other prefixes as Discover; and similar leading-digit ranges cover Diners Club, JCB, and UnionPay, falling back to 'Unknown' when nothing matches. This detection exists purely for display and is never involved in deciding whether the Luhn check passes — a number can fail network detection entirely and still be checksum-valid, or match a network's prefix perfectly and still fail the checksum.

The published test numbers come straight from each processor's own docs

The bundled reference table of sandbox card numbers — split by Stripe, PayPal, and Adyen, and further split into approve, decline, and 3-D Secure outcomes — is copied verbatim from each provider's own public testing documentation. None of these numbers are generated on the fly or invented to merely resemble a real issuer's range; they're the exact values each processor tells developers to use against their own sandbox environment for a given test scenario.

Passing this check proves nothing about a real card

A number that passes Luhn and matches a network's leading-digit pattern is only internally self-consistent — it says nothing about whether that number was ever issued to anyone, whether it has funds, whether it's expired, or whether it's been reported stolen. A real payment authorization happens through the card network or a processor like Stripe or Adyen, never through checksum arithmetic run in a browser.

Because of that gap, treat any card-number checker you don't control — this one included — as something to test with published sandbox numbers rather than a real card. This tool runs entirely in your browser with nothing sent anywhere, but that's not something you can verify by looking at a page, so the safer habit is simply never typing a live card number into a validator you didn't write yourself.

Questions people ask about Credit Card / BIN Checksum Validator

Does passing the check here mean the card number is real and usable?
No. It only means the digits are internally self-consistent under the Luhn checksum and roughly match a network's expected length and leading digits. Real usability depends on whether the number was actually issued, whether it's currently active, and whether it has available funds — none of which this tool has any way to check.
How does the tool decide whether a number is Visa, Mastercard, or something else?
Purely by matching the leading digits against each network's published BIN range — a leading 4 for Visa, certain ranges in the low 50s or 2-series for Mastercard, and so on. This detection is for display only and plays no role in whether the checksum itself passes or fails.
Where do the sandbox test card numbers in the reference list come from?
They're copied directly from Stripe, PayPal, and Adyen's own public developer documentation for testing payment integrations. None are generated or guessed; each one is the exact number a real developer would use to trigger a specific approve, decline, or 3-D Secure outcome in that processor's sandbox.
Can a completely made-up number pass the Luhn check?
Yes, easily — Luhn is simple arithmetic with roughly a one-in-ten chance any random digit string happens to satisfy it, and it's trivial to construct a number that passes on purpose. Passing Luhn is a necessary property of a real card number, never sufficient proof that one is real.
Can this tool find the issuing bank or country?
No. It only names the card network from the leading digits using a short built-in rule list. It has no BIN database, so it can't tell you which bank issued the card, the country, or whether it's a debit, credit or prepaid card.
What is the check digit on a card number?
It's the last digit. The issuer picks it so the whole number satisfies the Luhn formula, which means the other digits determine exactly one valid final digit. That's why a wrong last digit, or a wrong digit anywhere else, makes the checksum fail.
Which typing mistakes can the Luhn check miss?
It catches every single wrong digit and almost every swap of two neighbouring digits, except swapping 0 and 9. It can miss twin errors such as 22 typed as 55, 33 as 66 or 44 as 77, and any combination of several mistakes that happens to keep the total a multiple of 10.
Is it safe to type a card number into this validator?
The check is plain arithmetic in your browser tab and nothing is sent, but you can't confirm that from the page alone. For testing, use the published sandbox numbers listed below the checker, and avoid typing a live card into any online checker you don't control.

Related tools on BrakeTools

Content reviewed 2026-09-27.