Free Developer Tool
Generate Luhn-valid test card numbers for Visa, Mastercard, JCB, American Express, UnionPay, Discover, and Diners Club — or from a custom BIN. Built for payment engineers and QA. For testing only; these are not real cards.
No numbers yet. Fill the form above and click Generate.
No numbers yet. Fill the form above and click Generate.
Every generated number is structurally valid: correct length, correct IIN prefix for the chosen scheme, and a valid Luhn check digit. That makes them drop-in replacements for real cards when you're testing client-side validation, card-brand detection from BIN, PAN formatting in checkout forms, or anywhere your code needs a well-formed card number without the compliance overhead of using a real one.
They are not real cards. They will be declined by any live processor and will not work in gateway sandboxes that publish their own fixed test numbers (Stripe, Adyen, Braintree, etc.).
Seven of the most commonly tested networks. Prefix and length follow the ISO/IEC 7812 assignments published by each issuer.
| Scheme | IIN prefix | Length | Grouping |
|---|---|---|---|
| Visa | 4 | 16 digits | 4-4-4-4 |
| Mastercard | 51–55, 2221–2720 | 16 digits | 4-4-4-4 |
| JCB | 3528–3589 | 16 digits | 4-4-4-4 |
| American Express | 34, 37 | 15 digits | 4-6-5 |
| UnionPay | 62 | 16 digits | 4-4-4-4 |
| Discover | 6011, 644–649, 65 | 16 digits | 4-4-4-4 |
| Diners Club | 30, 36, 38, 39 | 14 digits | 4-6-4 |