Credit card numbers follow ANSI Standard X4.13-1983, and are created by using the Luhn algorithm. A valid credit card satisfies the Luhn check, which uses simple mathematical formula to validate a checksum of all numbers.
The major credit card numbers are comprised of 15 or 16-digit numbers, of which the first digit represents the Major Industry Identifier (MII). The last digit is the checksum digit that confirms to the Luhn algorithm (see below). Most popular MII identifiers are:
MII | Brand Name | Length | Notes |
---|---|---|---|
3 | American Express | 15 | Starts with 34 or 37 |
3 | Diners Club | 14 | Starts with 36 or 38 |
4 | Visa Card | 16 | |
5 | Master Card | 16 | |
6 | Discover Card | 16 | Starts with 65, 644, 6011 |
5,6 | Maestro Card | 16-19 | Starts with 50, 56, 58, 63, 67 |
The first 6-digit numbers including the MII is known as the Issuer Identification Number (IIN), formally known as the Bank Identification Number (BIN). The IIN tells us which credit card company issued the card, and what network it belongs to. For example, the credit card number starting with the 414720 represents JP Morgan Chase cards.
The next several digits before the final digit is known as the individual's account number.
The last digit is made up from the Luhn algorithm, and it represents the checksum of all digits. A card complying to Luhn check is the valid credit card number whethere it is actually issued by a card issuer or not.
Luhn algorithm is the modulus 10 formula used to validate a variety of identification numbers such as credit card and IMEI numbers. The right-most digit is used as the checksum digit, and the rest of the numbers represent the payload. Based on the position of the each digit, every 2nd digit from the right-most payload are doubled, and each digit (or doubled) are summed up make up the total. The total is then modulated to create the checksum digit. The payload and the checksum digit make up the credit card number. To learn more about Luhn Algorithm, please refer Wikipedia page.
As a developer, you may need an access to the "test" credit card numbers from various brands. We are listing a commonly used credit card numbers from well known brands that you can utilize. The numbers below conforms to Luhn check, and are valid card numbers.
Card Type | Test Number |
---|---|
Visa | 4111 1111 1111 1111 |
4242 4242 4242 4242 | |
Master Card | 5431 1111 1111 1111 |
5123 4558 0630 8521 | |
American Express | 3782 8224 6310 005 |
3714 4963 5398 431 | |
Discover Card | 6011 0009 9013 9424 |
6011 1111 1111 1117 | |
Diners Club | 3670 0102 0000 00 |
3614 8900 6479 13 | |
Maestro Debit | 6759 6498 2643 8453 |
6799 9901 0000 0000 019 |
Your IP | Hide my ip |
IP Location | , , |
ISP | |
Platform | |
Browser |
BTC USD
ETH USD
© 2006 - 2024, Brand Media, Inc. All rights reserved.