Free Credit Card Validator

Type or paste a card number to check it with the Luhn algorithm, see which network issued it (Visa, Mastercard, American Express and more) and whether its length is right. It checks that the number is correctly formed, not that the card exists or has funds. Everything runs in your browser.

Private by design: the check runs on this page in your browser. Card numbers are never sent, stored or logged. For testing a checkout, use the published test numbers below rather than a real card.

Spaces and dashes are fine. The result updates as you type.

Try a test number:

Test card numbers

Publicly documented test numbers. They pass the Luhn check, but they are not real accounts and only work in a payment provider's test mode.

Visa
4111 1111 1111 1111
Mastercard
5555 5555 5555 4444
American Express
3782 822463 10005
Discover
6011 1111 1111 1117
Diners Club
3056 930902 5904
JCB
3530 1113 3330 0000

Summary

A credit card validator checks whether a card number is correctly formed; it cannot tell you whether the card exists. To check a number free and privately here, type or paste it into Card number; spaces and dashes are fine. The result appears as you type: a status, the card network, a Luhn check and a length check, with the reason when one fails. For a list, click Batch validation, paste one number per line and press Copy results as CSV.

The check runs in your browser; nothing is uploaded (you can check the Network tab in DevTools). It does not check the expiry date, the security code or the funds, and it does not look up the issuing bank.

Formula: leave the rightmost digit as it is, then moving left double every second digit, subtract 9 from any result above 9, and add all the digits; the number passes when the total is a multiple of 10. For example, 4111 1111 1111 1111 totals 30 and passes, while 4111 1111 1111 1112 totals 31 and fails.

Table of Use: What Each Result Means

The three result statuses and what each one means
Status shownWhat it meansWhat to do
Valid card numberThe Luhn check passes, the prefix belongs to a known network and the length suits that networkThe number is well formed; it may still not be a real account
Passes the Luhn check, unknown card networkThe checksum and a plausible length (12 to 19 digits) are right, but the first digits match no known networkIt may be a private-label, regional or fuel card; confirm with the issuer
Invalid card numberThe Luhn check fails, the length is wrong, or both; the reasons are listed under the statusRe-check the digits against the card

Card networks, prefixes and lengths

As of October 2026, the tool uses the prefixes in the issuer identification number table of Wikipedia’s “Payment card number” article, which also lists Verve, Troy and UATP; the numbering scheme itself is ISO/IEC 7812. Where ranges overlap, the most specific range is tried first.

Card network prefixes and lengths
NetworkStarts withDigits
Visa413, 16 or 19
Mastercard51–55, 2221–272016
American Express34, 3715
Discover6011, 644–649, 65, 622126–62292516–19
JCB3528–358916–19
Diners Club30, 36, 38, 3914–19
UnionPay6216–19
Maestro5018, 5020, 5038, 5893, 6304, 6759, 6761–6763, 676770, 67677412–19
Mir2200–220416–19
RuPay508, 60, 81, 8216

Features

  • Three checks at once: the Luhn checksum, the network from the first digits and the length for that network, with plain-English reasons such as “Visa numbers have 13, 16 or 19 digits; this one has 15”.
  • 13 networks: the ten in the table plus Verve, Troy and UATP.
  • Card details panel: network, IIN / BIN (first 6), last 4 and check digit, plus a Copy digits button that copies the number without spaces. The number is grouped as 4-6-5 for American Express and in fours for most others.
  • Batch validation: up to 1,000 numbers at once in a table with Card number, Network, Digits, Luhn and Status columns. The CSV has the columns number, network, digits, luhn and status, and a cell starting with = + - or @ gets an apostrophe so a spreadsheet does not run it as a formula.
  • Test numbers: six published test numbers, each with a copy button, and Try a test number buttons that fill the box.
  • Tolerant input: only digits, spaces and dashes are kept, up to 40 characters.

Limits: no expiry date, security code, name or address check, no bank or country lookup, and no way to tell credit from debit. Lines that are not numbers at all are listed as Invalid in a batch.

How to Use the Credit Card Validator

  1. With Single card selected, click Card number and type or paste the digits, or press a button under Try a test number.
  2. Read the status, then the Network line.
  3. Check the Luhn check and Length chips; any problem is explained in a list below them.
  4. Under Card details, see IIN / BIN (first 6), Last 4 and Check digit, or press Copy digits.
  5. For a list, click Batch validation, paste one number per line into Card numbers, one per line, read Results and press Copy results as CSV.

Who Can Use It

Developers and testers checking a payment form, support teams looking at a mistyped number, and students learning how checksums work. Before a batch run, remove repeats with remove duplicate lines and count the lines with the line counter, since only 1,000 are checked at a time. If you write form validation yourself, the regex tester can check the format of a field, but only the Luhn sum catches a mistyped digit.

Other identifiers have checks of their own: bank accounts with the IBAN validator, books with the ISBN validator, addresses with the email validator and telephone numbers with the phone number formatter. To fill a test form with sample data, make people with the name generator and identifiers with the random string generator.

FAQs

How do I check if a credit card number is valid?

Type or paste the number into Card number. The result appears as you type: Valid card number when the Luhn check passes, the first digits match a known network and the length fits; Passes the Luhn check, unknown card network when the number is well formed but its prefix is not recognised; and Invalid card number, with the reason, otherwise. Spaces and dashes are ignored.

Does a valid result mean the card is real or has money on it?

No. The validator only checks that the number is correctly formed. Only the card issuer, through a payment provider, can tell whether a card exists, is active, has not expired or has funds. A made-up number can pass the Luhn check, as the test numbers on this page do.

What is the Luhn algorithm?

The Luhn algorithm, or mod 10 check, catches typing mistakes. Leave the rightmost digit as it is, then moving left double every second digit and subtract 9 from any result above 9, then add up all the digits. The number passes when the total is a multiple of 10. It detects any single wrong digit and most swaps of two neighbouring digits.

Why does my card number fail the Luhn check?

Almost always a typing mistake: a wrong, missing or extra digit, or two digits swapped. The explanation under the status names the problem, for example the wrong length for that network. One genuine exception exists: some UnionPay cards do not use a Luhn check digit, so the tool shows a note when a UnionPay-range number fails.

How does the validator tell which network issued a card?

From the first digits, called the issuer identification number (IIN) or bank identification number (BIN). For example Visa numbers start with 4, Mastercard with 51 to 55 or 2221 to 2720, and American Express with 34 or 37. It knows 13 networks. It does not look up the issuing bank, the country or whether the card is credit or debit.

How do I validate many card numbers at once?

Click Batch validation and paste up to 1,000 numbers, one per line. The table shows the network, the digit count, the Luhn result and a status for each line, and the heading counts how many are valid. Copy results as CSV puts the table on your clipboard for a spreadsheet. Lines beyond the first 1,000 are not checked.

Is it safe to type a real card number here?

The check runs in your browser and nothing is uploaded (you can check the Network tab in DevTools); the number is never sent, stored or logged. Even so, there is rarely a reason to type a real card number into a site you do not pay on. To test a checkout form, use the test numbers listed under the tool.

Where can I get test credit card numbers?

Under the tool, Test card numbers lists six published numbers for Visa, Mastercard, American Express, Discover, Diners Club and JCB, each with a copy button; the Try a test number buttons fill them in. They pass the Luhn check but are not real accounts and only work in a payment provider’s test mode, so use your provider’s own list for its checkout.