Credit Card Validator — Check Card Numbers (Luhn)

Type a card number to check its Luhn checksum, length and card brand — Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay, Maestro and more. Useful for testing checkout forms; includes official test numbers. Nothing is sent or stored.

Runs in your browserUpdated

Checked only in your browser. For testing, prefer the test numbers below — a valid checksum doesn’t mean a card exists or has money.

Test card numbers

    Bulk check

    Your data never leaves your computer. All processing happens 100% locally in your browser.

    How to use the Credit Card Validator

    1. Type or paste a card number — spaces and dashes are fine.
    2. See the brand, whether the length fits that brand and whether the Luhn checksum passes.
    3. Testing a payment form? Click a test number to use it; payment providers accept these in test mode only.
    4. Paste a list into Bulk check to validate many numbers at once.

    The Luhn algorithm

    Almost every payment card number ends with a check digit calculated with the Luhn (mod 10) algorithm. 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 end in 0. It catches most typos — a wrong digit or two swapped neighbors — before a form even contacts the bank.

    Card brands by first digits

    BrandStarts withLength
    Visa413, 16, 19
    Mastercard51–55, 2221–272016
    American Express34, 3715
    Discover6011, 644–649, 6516–19
    JCB3528–358916–19
    Diners Club300–305, 36, 38–3914–19
    UnionPay6216–19
    Maestro50, 56–58, 612–19

    What it can’t tell you

    A valid checksum only means the number is well-formed. Whether the card exists, is active or has funds is known only to the issuing bank, through a real payment authorization. Never use real card numbers for testing — use your payment provider’s test numbers.

    Also searched as: credit card number checker, luhn check, validate card number, card type checker, bin checker, test credit card numbers, luhn algorithm, visa number validator.

    Tools that pair well with the Credit Card Validator

    • Random Number Generator — Generate random numbers (with or without duplicates), pick winners from a list, shuffle names, split groups into teams, flip coins and roll dice — using your browser’s cryptographically secure randomness.
    • Mock Data Generator — Create up to 10,000 rows of realistic test data — users, products, orders, addresses, companies or nested API records — or build your own schema.
    • Regex Tester — Type a pattern and watch matches highlight live in your test text.
    • Password Breach Checker — Find out whether a password has appeared in known data breaches — billions of leaked passwords collected by Have I Been Pwned.

    Frequently asked questions

    How do I check if a credit card number is valid?
    Type it in: the tool runs the Luhn checksum, checks the length for the card brand and shows the brand. A pass means the number is well-formed, not that the card is active.
    What is the Luhn algorithm?
    A checksum formula: double every second digit from the right, add all digits, and the total must be a multiple of 10. It detects most typing mistakes.
    Which numbers can I use to test payments?
    Use the test numbers listed here (such as 4242 4242 4242 4242) with your payment provider’s test mode and any future expiry date. They never charge real money.
    Is the card number sent anywhere?
    No. Validation runs entirely in your browser and nothing is stored.
    Can I install Credit Card Validator as a web app and use it offline?
    Yes. Credit Card Validator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

    Related tools