Generate fake card numbers that pass the Luhn check, for testing payment pages only.

If you are building a checkout page or a sign-up form, you need card numbers to type again and again to make sure everything works. Using your real card for that is a bad idea: its number can end up in development logs and screenshots. Jood's test card number generator creates numbers that look like real ones and pass the Luhn check, but cannot be used for any payment.
Check that your form accepts a valid number, then change a single digit and see whether it rejects it with a clear message. Try the security code field with four digits for American Express, and make sure the field does not cut off a 15-digit number or force it into groups of four. You can check any number with the Card Number Validator (Luhn).
These numbers will not go through any real payment, nor through a free trial that asks for a card. And if you are testing a payment gateway in test mode, use the numbers the payment provider publishes in its documentation: on its side they are tied to specific outcomes, such as an approved or a declined payment.
We use cookies to measure traffic and improve the site (Google Analytics), and may show ads later. Nothing is enabled without your consent. Privacy policy