Credit Card Validator

June 30th, 2015

Validate a credit card number for all of the popular credit card companies using two different popular methods. First is the Luhn Algorithm that gets the proper checksum for the card, the second method is the Bin Number Checker.

Credit Card

BIN Number Info

The first six digit number on a bank card is know as the Bank Identification Number (BIN) which identifies the location of the bank that issued the card, while the latter portion identifies the specific name of the bank. BINs are traditionally used by online Merchants as a way to detect fraud by matching the geographic area where the cardholder is located to the geographic area identified in the Bank Identification Number. The term Issuer Identification Number (IIN) and Interbank Card Association Number (ICA) also refer to this same collection of numbers.

Luhn's Proof

Interactive example of how we did the validation above using Luhn formula.

As an example since you have not tried to validate a credit card yet we will use 4929525461775096 as the test number to demonstrate how to use Luhn's formula.

Account number 492952546177509 x
Double every other 894910210412114710018 x
Sum of digits 894912143157109 =64

The check digit (x) is obtained by computing the sum of digits then computing 9 times that value modulo 10 (so that's: (64 * 9 mod 10)). In summary:

  1. Compute the sum of the digits (64).
  2. Multiply by 9 (576).
  3. Take the last digit (6).
  4. The result is your check digit.

Significance of First Digit

The left most digit on the card has a lot more meaning than what you may think. The table below outlines what the number means in the larger scheme of things.

First Card Digit Industry Category
0ISO/TC 68 and Other Industry Assignments
1Airlines
2Airlines and Other Industry Assignments
3Travel and Entertainment
4Banking and Financial
5Banking and Financial
6Merchandising and Banking
7Petroleum
8Telecommunications and Other Industry Assignments
9National Assignment

Credit Card Break Down by Issuer

Each card company is allotted a set number of prefixes they are allowed to use to generate their card numbers. You can think of these prefixes as being similar to area codes within a phone number. Each area code can tell you the state or province based on the first three digits of a ten digit phone number. The same can be done with the credit card prefix.

Card Digits Security / Length Card Prefix
American Express 15 CID / 4 34, 37
Diners Club - Carte Blanche 14 CVV / 3 300, 301, 302, 303, 304, 305
Diners Club - International 14 CVV / 3 36, 38
Diners Club - USA & Canada 16 CVV / 3 54
Discover 16 CID / 3 6011, 644, 645, 646, 647, 647, 649, 65
enRoute 15 CVV / 3 2014, 2149
InstaPayment 16 CVV / 3 637, 638, 639
JCB Co Inc (15 digit) 15 CVV / 3 1800, 2100
JCB Co Inc (16 digit) 16 CVV / 3 3088, 3096, 3112, 3158, 3337, 3528
Laser (16 digit) 16 CVV / 3 6304, 6706, 6709, 6771
Laser (17 digit) 17 CVV / 3 6304, 6706, 6709, 6771
Laser (18 digit) 18 CVV / 3 6304, 6706, 6709, 6771
Laser (19 digit) 19 CVV / 3 6304, 6706, 6709, 6771
MasterCard 16 CVC2 / 3 51, 52, 53, 54, 55
Visa (13 digit) 13 CVV2 / 3 4, 40240071, 4485, 4532, 4539, 4556, 4716, 4916, 4929
Visa (16 digit) 16 CVV2 / 3 4, 40240071, 4485, 4532, 4539, 4556, 4716, 4916, 4929
Visa Electron 16 CVV / 3 4026, 417500, 4508, 4844, 4913, 4917
Voyager 15 CVV / 3 8699

Testimonials

`

"Incredible, usually for testing we have to obfuscate live user data, but with your data I was able to create a 1,000 users in only a few minutes."

Russ McEwan, Denver, CO

"Thanks this is exactly what I was looking for when I needed a lot of users created as test data."

Timothy Hardy, Chicago, IL

"So glad I stumbled on this site. Now I would not be able to do my job without these helpful generators. Thanks."

S. Rosario, Maryland