Card Validator

Validate any card number and detect the brand — instantly, privately, free.

  • We do NOT store your card number.
  • Validation runs entirely in your browser — no data is sent to any server.
  • No account required. No data is saved.

scroll for examples & details

How to use

How to use

  1. 1

    Type or paste your card number — formatting spaces are handled automatically.

  2. 2

    The brand is detected after the first digit. Validation runs at 13+ digits.

  3. 3

    Green means structurally valid. Red means a digit is likely wrong.

Card

What is a credit card number?

A credit card number is a 13–19 digit identifier embossed on every payment card. The first 6–8 digits form the Bank Identification Number (BIN), which encodes the card network, issuing bank, and card type. The middle digits identify the account, and the final digit is a Luhn check digit — used to catch transcription errors. This free credit card validator online checks the Luhn checksum and identifies the network from the BIN prefix.

Validation

How card validation works (Luhn algorithm)

Every major card network uses the Luhn algorithm (ISO/IEC 7812) to validate card numbers. Starting from the rightmost digit, every second digit is doubled. If doubling gives more than 9, subtract 9. Sum all digits — a valid card number always produces a total divisible by 10. Brand detection inspects the leading digits: Visa starts with 4, Mastercard with 51–55 or 2221–2720, Amex with 34 or 37, Discover with 6011 or 65, and UnionPay with 62.

Example

Example: for the Visa test number 4242 4242 4242 4242, the Luhn sum is 60 — divisible by 10, so it is structurally valid.

Benefits

Why card validation matters

Client-side card validation catches obvious errors before a payment request reaches your payment gateway. This reduces failed charges, improves checkout conversion, and lowers unnecessary API calls to Stripe, Braintree, or Adyen. It is also essential in test environments where developers need to quickly validate card numbers without hitting live payment APIs.

  • Catches typos before they reach the payment gateway — reducing failed charges.
  • Detects card brand from the first digit — Visa, Mastercard, Amex, Discover, UnionPay, and more.
  • Runs entirely in your browser — no card data is ever transmitted to any server.
  • Reduces unnecessary API calls to Stripe, Braintree, or Adyen in development.
  • Essential for test environments — validate card numbers without hitting live payment APIs.
  • Free, instant, no registration required.
Format

Card number structure — BIN, account, and check digit

Every payment card number follows the ISO/IEC 7812 standard and is divided into three parts. The first 6–8 digits are the Bank Identification Number (BIN) — also called the Issuer Identification Number (IIN). The BIN encodes the card network (Visa, Mastercard, etc.), the issuing bank, and the card tier. The middle digits (typically 6–12 digits) identify the cardholder's account at the issuing bank. The final digit is the Luhn check digit, computed from all preceding digits. It has no financial meaning — it exists purely to catch single-digit typos before a transaction is even attempted.

Card types

Supported card types

Test numbers below pass Luhn validation. They are not real card numbers.

  • VisaStarts with 4 · 16 digits4242 4242 4242 4242
  • Mastercard51–55 or 2221–2720 · 16 digits5500 0000 0000 0004
  • American Express34 or 37 · 15 digits3782 822463 10005
  • Discover6011 or 65 · 16 digits6011 1111 1111 1117
  • UnionPay62 · 16–19 digits6250 9470 0000 0014
  • JCB3528–3589 · 16–19 digits3566 0020 2036 0505
  • Diners Club300–305, 36, 38 · 14 digits3056 9309 0259 04
  • Maestro6304, 6759, 6761–63 · 12–19 digits6759 6498 2643 8453
  • Mir2200–2204 · 16 digits2200 0000 0000 0004
  • RuPay6521, 6522 · 16 digits6521 0000 0000 0000
  • Elo4011, 5066, 6277… · 16 digits6362 9700 0457 9680
  • Troy9792 · 16 digits9792 0303 1010 3019
  • Unknown · 13–19 digits— (Luhn valid, no known BIN)
Security

What is a CVV / CVC?

CVV (Card Verification Value) and CVC (Card Verification Code) are interchangeable terms for the 3- or 4-digit security code printed — not embossed — on a payment card. Visa, Mastercard, and Discover print a 3-digit CVV on the signature strip on the back of the card. American Express prints a 4-digit CID on the front of the card, above the card number. The CVV is not part of the card number and is never stored by merchants after a transaction. It exists specifically for card-not-present (online) transactions: it proves physical possession of the card, since it cannot be derived from the card number alone. This validator checks only the card number — never the CVV. Do not enter your CVV anywhere that is not a verified payment form.

Card expiry date — what it means

Every payment card has a printed expiry date in MM/YY format. After the last day of the expiry month, the card is declined at all terminals and online checkouts. Expiry dates allow card networks to periodically reissue cards with updated security features, new BIN ranges, and refreshed CVV codes. Unlike IBANs, which remain valid as long as the bank account is open, card numbers have a fixed lifespan — typically 3–5 years from issue. When a card expires, the issuing bank sends a replacement card with a new expiry date and a new CVV (the card number may or may not change depending on the bank's policy).

Card vs IBAN

Card number vs IBAN — key difference

A card number and an IBAN both look like long strings of digits, but they are completely different. A card number identifies a payment card product and is used at point-of-sale terminals and online checkouts. An IBAN identifies a bank account and is used for wire transfers and direct debits. You cannot use a card number to make a bank transfer, and you cannot use an IBAN at a card checkout. If someone asks for your IBAN, they want to send money to your bank account — not charge your card.

CardIBAN
What it identifiesA payment card productA bank account
Used forRetail purchases, online checkoutWire transfers, payroll, direct debit
Payment railVisa, Mastercard, Amex networksSEPA, SWIFT, bank transfer
Has CVV / expiryYes — required for online paymentsNo — neither exists for bank accounts
Need to validate a bank account number? Try our IBAN Validator — supports 70+ countries.
Common mistakes

Common Card Number Mistakes

Even a single wrong digit causes a Luhn failure. These are the most frequent causes:

  • Mistyped digit

    The most common cause — a single digit entered inaccurately. Try re-entering carefully from your physical card.

  • Transposed adjacent digits

    Swapping two adjacent digits (e.g. '42' → '24') is invisible to the eye but the Luhn algorithm catches it immediately.

  • Truncated number

    Card numbers are 13–19 digits long. Missing even one digit causes an immediate Luhn failure.

  • Using a real card number for testing

    Use published test numbers (e.g. 4242 4242 4242 4242 for Visa). Real card numbers should never be shared with any tool or system.

Troubleshooting

Why Card Validation Fails

Our validator runs two checks in sequence. A failure at either step means the card number is structurally invalid:

  1. 1

    1. Unknown network prefix

    The leading digits must match a known card network. If they don't, the brand shows as Unknown — but Luhn validation still runs.

  2. 2

    2. Wrong digit count

    Each card network has a fixed expected length. Visa = 16, Amex = 15, Mastercard = 16. A number that is too short or too long fails immediately.

  3. 3

    3. Failed Luhn checksum

    Starting from the rightmost digit, every second digit is doubled. If the result exceeds 9, subtract 9. The sum of all digits must be divisible by 10. One wrong digit breaks this.

Passing both checks confirms the card number is structurally correct. It does NOT confirm the card is active, not expired, or has sufficient funds — only the issuing bank can verify that.

FAQ

Frequently Asked Questions about Card Validation

What is a credit card number?

A credit card number is a 13–19 digit string embossed on a payment card. It is divided into a Bank Identification Number (BIN, first 6–8 digits), an account identifier (middle digits), and a Luhn check digit (last digit). The BIN encodes the card network and issuing bank; the check digit is used to catch typos.

How do I validate a card number online?

Paste or type the card number into the field above. The validator instantly applies the Luhn algorithm and detects the card brand from the leading digits. No button press needed — validation runs as you type.

What is the Luhn algorithm?

The Luhn algorithm (ISO/IEC 7812) is a checksum formula used by all major card networks to catch transcription errors. Starting from the rightmost digit, every second digit is doubled; if the result exceeds 9, subtract 9. The sum of all digits in a valid card number is always divisible by 10.

What is a BIN number?

A BIN (Bank Identification Number), also called IIN (Issuer Identification Number), is the first 6–8 digits of a card number. It identifies the card network (Visa, Mastercard, etc.), the issuing bank, and the card type (credit, debit, prepaid). BINs are used by merchants and payment processors to route transactions and apply country-specific rules.

What is a CVV or CVC?

CVV (Card Verification Value) and CVC (Card Verification Code) are 3- or 4-digit security codes printed on payment cards. Visa, Mastercard, and Discover print a 3-digit CVV on the back; Amex prints a 4-digit CID on the front. The CVV is not stored by merchants and cannot be derived from the card number. It exists to prove physical possession of the card for online transactions.

Why does my card number fail validation?

Luhn validation fails when at least one digit is wrong. Common causes: a single digit is mistyped, two adjacent digits are swapped (a transposition error), or the number is truncated. If the card number looks correct visually, try re-entering it carefully. Note: this validator checks structure only — it cannot confirm whether your card is active or has sufficient funds.

Is it safe to enter my card number here?

Yes. Validation runs entirely in your browser. No data is transmitted to any server, stored in any database, or logged in any way. We see nothing. That said, do not enter your CVV — this tool does not need it, and you should never enter CVV codes into non-payment forms.

How many digits does a Visa card have?

Visa card numbers are always 16 digits and always begin with the digit 4. American Express cards are 15 digits and begin with 34 or 37. Mastercard cards are 16 digits and begin with 51–55 or 2221–2720. Discover cards are 16 digits and begin with 6011 or 65.

What is the difference between a debit and credit card number?

From a structural standpoint, debit and credit card numbers follow the same format — both use the Luhn algorithm and the same BIN-based brand detection. The difference is financial: a credit card draws from a credit line extended by the bank; a debit card draws directly from a bank account. The card number itself does not reveal which type it is.

Can a card number identify the issuing bank?

Partially. The BIN (first 6–8 digits) identifies the card network and issuing bank. BIN databases map BINs to bank names and countries. However, this mapping is not public — commercial BIN lookup services aggregate this data. This validator identifies the card network (Visa, Mastercard, etc.) but does not perform BIN-to-bank lookups.

What is the difference between a card number and an IBAN?

A card number identifies a payment card product and is used for retail purchases and online checkouts. An IBAN identifies a bank account and is used for wire transfers and direct debits. They operate on entirely different payment networks. You cannot use a card number to make a bank transfer, and you cannot use an IBAN to pay at a checkout.

Can I use my card number for a bank transfer?

No. Bank transfers require a bank account number (typically in IBAN format in Europe). Your card number is tied to a card product, not directly to your bank account. To receive a bank transfer, share your IBAN — not your card number.

Does a valid card number mean the card is active?

No. Luhn validation only confirms the card number is structurally correct — the digits pass the checksum. It does not confirm the card is active, not blocked, not expired, or has available funds. Only the issuing bank can verify that, which happens when a real payment is attempted.

Related tools

Related tools

IBAN & Card Validator

Free, private, instant bank tools.

What we store

Language preference is saved in a cookie (NEXT_LOCALE). Light/dark theme is saved in localStorage (theme). Nothing else — no data is sent anywhere.

This site uses Google Ads to stay free.

© 2026 IBAN & Card Validator. All rights reserved.