Credit Card Format 101

Document created by andrew.harris on May 11, 2018Last modified by andrew.harris on May 11, 2018
Version 3Show Document
  • View in full screen mode

CREDIT CARD NUMBER FORMATS

This document has two parts. The first provides basic information about card numbers, such as length, prefixes, and validation numbers. The second part provides information about the Luhn Mod-10 algorithm used to validate numbers.

 

 

NOTE: The data presented here is for informational proposes only and is subject to change by the Credit Card Associations/Companies. You should verify the information using additional sources prior to using it to create or alter any of your business systems, processes, or procedures.

 

TABLE 1 Card Number Formats

Card Type

Card Number Prefix/Range

Number Length

Card Validation Number Length

Comments

American Express

34 and 37

15 digits

4 digits

Diners Club International

36

14 digits

3 digits

Account Numbers starting with 36 may be submitted as either Discover (recommended) or Diners Club.

Diners Club (US and Canada)

54 and 55

16 digits

3 digits

These are processed through the MasterCard network and must be submitted as MasterCard.

Discover

300000-306000 309500-309600 352800-359000 36

38
39
64
65
6011 622126-622925 624000-262999 628200-628899

14 digits or

16 digits

3 digits

 

Account Numbers starting with 36 may be submitted as either Discover (recommended) or Diners Club.

JCB

35 (except 352800-358999)

16 digits

3 digits

Account numbers 352800-358999 are processed through the Discover network

MasterCard

51-55
222100 - 272099

16 digits or
19 digits

3 digits

The 222100 - 272099 BIN range will be active as of October 2016. Merchants must support this BIN range no later than January 1, 2017.

Visa

4

16 digits or
19 digits

3 digits

 

LUHN MOD-10 ALGORITHM FOR CARD NUMBER VALIDATION:

The Luhn Mod-10 algorithm was invented in 1954 by IBM scientist Hans Peter Luhn and is a relatively simple formula used in has numerous applications to validate identification numbers, including credit cards. The algorithm detects all single digit errors in an account number, as well as most transpositions of adjacent numbers.

 

Use the following method to determine if an account number is Mod-10 compliant:

  1. Working from the right, double every other number. If the result of any doubling is a 2-digit number, treat them as individual digits for step 2. For example, 2 * 9 = 18, should be treated as a 1 and an 8.

  2. Add all the numbers together, including those you did not double. Remember to treat any 2-digit numbers as individual numbers.

  3. If the result of step 2 is a multiple of 10, the account number is Mod-10 compliant.

 

Example: Mod-10 Algorithm

For the account number 4005550000081019, the computations are shown in the table below.

 

4

0

0

5

5

5

0

0

0

0

0

8

1

0

1

x2

x2

x2

x2

x2

x2

x2

x2

8

0

0

5

10

5

0

0

0

0

0

8

2

0

2

8+

0+

0+

5+

1+0+

5+

0+

0+

0+

0+

0+

8+

2+

0+

2+

The result is 40, which is a multiple of 10 and therefore compliant.

Attachments

    Outcomes