Test Card Generator
Generate Luhn valid test card numbers by brand using the correct prefixes and check digits.
Generate test card numbers
Numbers: 0 · Luhn check: passed
How to use the Test Card Generator
- Pick the card brand you need, or choose any brand for a mix.
- Set how many numbers to generate and whether to group the digits.
- Copy the test numbers, and check that every row passes the Luhn check.
Features
- Correct prefixes for six major card brands
- Luhn check digit calculated for every number
- Test data only, safe for sandbox payments
- Grouped or ungrouped digit output
Advertisement
Frequently Asked Questions
Common questions about the free online test card generator.
It is a made up card number that passes the Luhn checksum and prefix rules for a brand, used
only in sandbox payment testing.
No. They are random test data with no linked account, so they are rejected by real payment
networks and cannot take any money.
Every digit except the last is doubled from the right, digits over nine are reduced by nine,
and the final digit makes the total a multiple of ten.
Visa, Mastercard, American Express, Discover, JCB and Diners Club, each with the correct
number length and starting prefixes.
American Express uses fifteen digits and Diners Club uses fourteen, while Visa, Mastercard,
Discover and JCB use sixteen digits.
They are generated from your browser crypto random source, so repeats are extremely unlikely,
though you can regenerate any time.
Yes. Copy the list into fixtures, and keep in mind that sandbox gateways usually also require
a test expiry date and CVV.
No. The numbers are created locally with the browser crypto API, so nothing is transmitted or
stored anywhere.
Never. They are test data only and would be declined by any real processor and may breach the
terms of your gateway.
Yes. It is completely free with no account, no sign-up and no limit on how many test numbers
you create.
Last updated: October 10, 2026