Tools
PDF Tools 34
Image Tools 5
AI Writing 13
Text Tools 13
SEO and websites 22
YouTube and video 13
Calculators and converters 17
Developer Tools 13
Other tools 2
Scanner Blog
Language

Test Card Number Generator

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

Related tools

All tools in this group
Illustration of a test card number being generated from the tool settings

Card numbers for testing forms, not for paying

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.

How to use it

  1. Pick the network under "Card Type": Visa, MasterCard, American Express or Discover.
  2. Click "Start Now".
  3. Five cards appear, each with a number, an expiry date as month and year, and a CVV code. To get new numbers, pick the type and click again.

Numbers shaped like real ones

  • The start: Visa begins with 4, Mastercard with 51 to 55 or 2221 to 2720, American Express with 34 or 37, Discover with 6011, 644 to 649 or 65. If your form shows the network logo from the first digits, you can test it.
  • Length and grouping: 16 digits in four groups, and 15 digits for American Express, grouped as 4, 6 and 5.
  • Security code: three digits, and four for American Express.
  • Expiry date: always in the future, in one of the next five years.
  • Check digit: the last digit is worked out with the Luhn algorithm, so the number passes the format check in forms.

What to test with them

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).

What they cannot do

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.