Skip to content

Card Number Anatomy

What does each digit of a payment card number mean, and how many digits should it have? Type a test number to see it broken down. It runs in your browser; nothing is sent or stored.

Industry (MII) Issuer (IIN/BIN) Account identifier Check digit
Card network—
Digits—
Valid lengths for this network—
Luhn check digit—

How many digits does each card brand use?

NetworkStarts withLength
Visa413, 16 or 19
Mastercard51–55, 2221–272016
American Express34, 3715
Discover6011, 644–649, 6516–19
Diners Club36, 38, 300–30514–19
JCB3528–358916–19
UnionPay6216–19
Maestro50, 56–6912–19

The four parts of a card number

  1. Major Industry Identifier (MII): the first digit, which tells you the type of issuer (4 = Visa, 5 = Mastercard, 3 = travel and entertainment cards).
  2. Issuer Identification Number (IIN/BIN): the first 6 to 8 digits, which identify the issuing bank. Look one up with the BIN lookup.
  3. Account identifier: the digits after the IIN, which point to the individual account.
  4. Check digit: the final digit, set by the Luhn algorithm so that typing mistakes are caught.

More PAYATE tools

Frequently asked questions

How many digits are in a credit card number?

Most credit and debit cards have 16 digits. American Express uses 15, Diners Club often 14, and some Visa, Maestro, UnionPay and Discover cards use up to 19. The length depends on the card network, not on the bank.

What do the first digits of a card number mean?

The very first digit is the Major Industry Identifier (MII): 4 is Visa, 5 and 2 are Mastercard, 3 is American Express or Diners, 6 is Discover, UnionPay or Maestro. The first 6 to 8 digits are the IIN/BIN, which identifies the bank that issued the card.

What is the last digit of a card number?

The last digit is a check digit calculated with the Luhn algorithm. It catches most typing mistakes, such as one wrong digit or two swapped digits. A passing check only means the number is well-formed; it does not mean an account exists.

What is the issue number on a credit card?

An issue number is a 1 or 2 digit number that some older UK debit cards (Maestro and the former Switch/Solo cards) printed on the front to show how many times the card had been reissued. Most modern cards no longer have one; if a form asks for it and your card has none, leave it blank.

Is the security code (CVV) part of the card number?

No. The 3 or 4 digit security code is printed separately on the card and is never part of the long card number. It is not derived from the number by any public formula.

Is it safe to type a card number here?

The page works entirely in your browser and sends nothing to a server, but there is no reason to type a real card. Use the published test numbers on our sandbox card numbers page instead.