Generate Luhn-valid test card numbers for Visa, Mastercard, Amex, Discover, JCB, Diners Club, and UnionPay. Export to CSV, JSON, SQL, or Playwright format.
For software testing only. Generated numbers pass the Luhn checksum but are entirely synthetic: they are not linked to any real bank account and cannot process real transactions. Use only in sandbox and staging environments for payment integration testing. Submitting these to a live payment endpoint is not fraud on its own since they are not real numbers, but doing so may still flag your merchant account for review.
Generate Test Cards
Preview
Results
| # | Card Number | Network | Expiry | CVV | Name |
|---|
What Is a Credit Card Number Generator?
A credit card number generator creates syntactically valid numbers that pass the Luhn algorithm checksum used by payment processors. These numbers are entirely synthetic, not linked to any real bank account, and cannot be charged. They exist to help developers and QA engineers test payment form validation and checkout flows without using real financial data.
This tool supports all major card networks, generates complete test datasets with expiry dates and CVV codes, and exports to developer-ready formats including Playwright test code.
What Is the Luhn Algorithm?
The Luhn algorithm, also called modulus 10, is a checksum formula invented by IBM scientist Hans Peter Luhn in 1954. It validates identification numbers including credit card numbers and IMEI numbers. It works by doubling every second digit from the right, subtracting 9 from any result above 9, summing all digits, and checking that the total is divisible by 10. Every number this tool generates passes that check.
Card Network Reference
| Network | BIN Prefix | Length | CVV |
|---|---|---|---|
| Visa | 4 | 16 digits | 3 digits |
| Mastercard | 51-55, 2221-2720 | 16 digits | 3 digits |
| American Express | 34, 37 | 15 digits | 4 digits |
| Discover | 6011, 65 | 16 digits | 3 digits |
| JCB | 3528-3589 | 16 digits | 3 digits |
| Diners Club | 300-305, 36, 38 | 14 digits | 3 digits |
| UnionPay | 62 | 16-19 digits | 3 digits |
Using Test Cards With Payment Gateways
Stripe
Switch to Stripe test mode using your sk_test_ keys. Any Luhn-valid number with a future expiry and any correctly sized CVV passes format validation. Stripe also publishes specific numbers that trigger declines, 3D Secure flows, and other outcomes in its own documentation.
PayPal Sandbox
Create sandbox buyer accounts in the PayPal Developer Dashboard, then add a generated card as the payment method on file.
Braintree Sandbox
Braintree sandbox accepts any Luhn-valid number with a future expiry for the Drop-in UI or direct API calls.
Security note: Never use generated test numbers against a production payment endpoint. Always verify your integration is in sandbox or test mode first, since gateways log every attempt and unusual activity can flag a merchant account for review.