How to Validate a Credit Card Number
PDF Print

Credit card numbers follow the Luhn algorithm, which is a checksum test in a number.  To see how this works, start from the right and double each second digit (1111 becomes 2121), and then add them all together.  You should end with a number evenly divisible by 10.  If it doesn't, the credit card is not valid.