Validate a credit card number

Fake credit card numbers for all major brands

These credit card numbers DO NOT work! They are for testing purposes only. Without a valid owner name, an expiration date and a valid CVV code, they can't be used for real transactions. You should use these numbers only to test your validation strategies and for bogus data. Note that the algorithm used here is freely available across the web even Wikipedia.org. These numbers were generated randomly.You can refresh the page to get new numbers.

VISA:

MasterCard:

American Express (AMEX):

Discover:

JCB:

Diners Club - North America:

Diners Club - Carte Blanche:

Diners Club - International:

Maestro:

LASER:

Visa Electron:

InstaPayment:

How to validate a Credit Card Number?

Most credit card number can be validated using the Luhn algorithm, which is more or a less a glorified Modulo 10 formula!

The Luhn Formula:

Drop the last digit from the number. The last digit is what we want to check against

Reverse the numbers

Multiply the digits in odd positions (1, 3, 5, etc.) by 2 and subtract 9 to all any result higher than 9

Add all the numbers together

The check digit (the last number of the card) is the amount that you would need to add to get a multiple of 10 (Modulo 10)