Chapter 25. Credit Card Numbers
Specifications for credit card numbering are in ISO/IEC 7812-1:1993 and the American National Standards Institute ANSI X4.13. Most credit card numbers are now 16 digits, grouped in blocks of four digits; longer or shorter numbers are historical and you are not likely to see them.

25.1. Card Issuers

The first digit is the Major Industry Identifier (MII), which represents the category of the issuer of the card, according to this table:
MII Digit Issuer Category
0 ISO/TC 68 and other industry assignments
1 Airlines
2 Airlines and other industry assignments
3 Travel and entertainment
4 Banking and financial
5 Banking and financial
6 Merchandizing and banking
7 Petroleum
8 Telecommunications and other industry assignments
9 National ...

Get Joe Celko's Data, Measurements and Standards in SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.