A valid credit card number (also known as Primary Account Number - PAN) has several fields and each of them has a meaning.For the technically inclined, this number complies to the ISO/IEC 7812 numbering standard.
It identifies the industry where the card will be most used in.
If this digit is 9 the next three digits are the country code from ISO 3166-1.
Anyone can make a website with a form and require you to insert valuable and sensitive information which requires you to give up your privacy.
This is a way to protect yourself in such situations.
The other reason we made this are programmers testing ecommerce websites, applications or other software.
They usually need lots of fake data, and this is a very easy way to generate a bunch of valid credit card numbers in a split second.
Information such as expiration date, card holders name and CVV numbers.
Merely typing a valid credit card number into a form is not enough to purchase anything and you should not attempt to.
This formula has been in use to validate a lot of identification numbers besides credit cards since its development by scientist Hans Peter Luhn from IBM.