To be completely clear and spell this out, these fake credit card numbers should not be used to try and purchase stuff. They merely respect guidelines of a valid credit card number. I advise you not not to try to use these for any actual transactions, only for testing purposes! In order to complete a purchase a combination of data must be had, and merely a card number is not enough. 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 generator can get you up to 9999 fake credit card numbers at a time. They are mathematically valid because they respect the Luhn formula, as described here. You can get the credit card dump in one of three available formats. Feel free to run it as many times as you like.