Credit Card Number Structure

A payment card number (PAN) is structured into fields: MII, BIN/IIN, account number and check digit.

FieldDigitsMeaning
MII1Major Industry Identifier (card brand category)
BIN/IIN6Bank Identification Number / Issuer Identification Number
Account numbervariableIssuer-assigned account identifier
Check digit1Luhn checksum digit

MII values: 4=Visa (banking), 5=Mastercard (banking), 3=AMEX (travel), 6=Discover (merchandising). Use the PAN Structure Analyzer to break down a number.

Card number structure diagram

Diagram of a payment card number showing MII, BIN, account number and Luhn check digit fields

How this tool works

A card number is not random. ISO/IEC 7812 lays out the fields, the major industry identifier narrows the family, the issuer identifier is six digits, the account number is the issuer's own, and the last digit is a checksum. Knowing the layout means you can read a number the way you read a date.

The diagram below sets the fields out against the positions they occupy in a 16 digit number. The widths shift for other lengths, because a 19 digit Visa simply has a three digit longer account number and a 15 digit American Express has a shorter one.

Field widths in a 16 digit number

FieldDigitsPositions
Major industry identifier1-21
Issuer identifier (BIN/IIN)62-7
Account number7-128-15
Check digit116

The 978 and 979 prefixes on a barcode are not part of a card number. They are the EAN prefix that identifies a book.

When to use it

Frequently asked questions

How is a card number structured?

Into a major industry identifier of one or two digits, a six digit issuer identifier, the issuer's own account number, and a single checksum digit at the end.

What is the major industry identifier?

The first digit or two, which narrows the card to a family of networks. A 4 is Visa, a 5 is Mastercard, a 3 is usually American Express, and 6 covers a union of issuers.

Why do the field widths change?

Because the total length is set by the brand and the issue date, and the account number absorbs the difference. A 19 digit Visa has a 12 digit account number, a 16 digit Visa has 8.

Is the account number meaningful on its own?

No. It is an identifier the issuer chose, and only the issuer can map it to a cardholder.

Does the structure prove the number is a real card?

No. It proves the digits are arranged the way a card number is arranged. Whether an account exists behind it is a question for the issuer.

Related tools

Related guides