Test Credit Card Generator
Generate seeded, reproducible, Luhn-valid TEST credit card numbers for six networks (Visa, Mastercard, Amex, Discover, JCB, Diners Club). A named seed makes every run deterministic and shareable — the same seed always yields the same cards. Pick a network, choose CVV / expiry / cardholder toggles, and export to JSON, NDJSON, CSV, SQL, or TypeScript. These are fictitious test numbers for payment-integration testing only — they are not real accounts and will never authorize a charge.
About this ToolHow it works, benefits & use casesTap to collapse
Generate Luhn-valid test credit card numbers for six networks - Visa, Mastercard, American Express, Discover, JCB, and Diners Club - with a twist most generators lack: it is fully reproducible. Every run is driven by a named seed, and the same seed always produces exactly the same cards. That means you can commit a fixture, paste a shareable URL into a ticket, or write a test that asserts on specific numbers, and get identical output every time, on every machine. Each card uses the correct issuer prefix (BIN) and length (15 digits for Amex, 14 for Diners, 16 for the rest), a matching CVV (4 digits for Amex, 3 otherwise), a future expiry date, and a sample cardholder name, all formatted with network-specific spacing and passing the Luhn checksum so card forms accept them as structurally valid. Toggle exactly what you want in the output - CVV, expiry, cardholder name, spaced or raw digits, optionally masked - choose a network or let it mix, then export to JSON, NDJSON, CSV, a SQL INSERT, or a TypeScript const. A live styled card preview shows the first cards as you tune the options, and a reference table lists the canonical published gateway test numbers (Stripe and others) with what each one triggers. These are fictitious test numbers for payment-integration testing only - they are not real accounts and will never authorize a charge.
How to Use
- 1Set a seed (any text) - the same seed always regenerates the same cards - or hit Regenerate for a fresh set.
- 2Choose a network (or Any / mixed) and how many cards to generate (1 to 100).
- 3Toggle CVV, expiry, cardholder name, spaced groups, and masking to shape the output.
- 4Pick an export format: JSON, NDJSON, CSV, SQL INSERT, or TypeScript.
- 5Copy or download the output, or share the URL so a teammate gets the identical batch.
Key Benefits
- Seeded and reproducible: the same seed always yields the same cards
- Six networks with correct BIN prefixes and lengths (Amex 15, Diners 14, others 16)
- Every number passes the Luhn checksum so forms treat it as structurally valid
- Network-aware CVV length - 4 digits for Amex, 3 for everything else
- Toggle CVV, expiry, cardholder name, spaced or raw digits, and masking
- Exports to JSON, NDJSON, CSV, SQL INSERT, and TypeScript
- Canonical gateway test-card reference (success, decline, 3D Secure, and more)
- Runs entirely in your browser - no real data, no network calls
Common Use Cases
- Testing that checkout and payment forms accept the right number formats and lengths
- Verifying client-side Luhn validation and card-type detection by prefix
- Seeding QA databases or fixtures with stable, reproducible fake card data
- Demonstrating that a form distinguishes Amex (4-digit CVV) from other networks
- Looking up the published gateway test numbers for end-to-end sandbox flows
For testing only. These are fictitious, Luhn-valid test numbers — not real card accounts. They will be declined by any payment processor. Never use them for fraud or real purchases.
Seed consolelog — same seed, same cards.
Generation
Any text — drives reproducibility
Copy, download, share, or pipe to another tool
[
{
"network": "jcb",
"number": "3570 1037 1366 3389",
"cvv": "503",
"expiry": "02/29",
"cardholderName": "MARY THOMAS"
},
{
"network": "jcb",
"number": "3580 4367 0874 9658",
"cvv": "295",
"expiry": "04/29",
"cardholderName": "JENNIFER ANDERSON"
},
{
"network": "mastercard",
"number": "5271 0180 7658 2447",
"cvv": "802",
"expiry": "08/31",
"cardholderName": "EMILY BROWN"
},
{
"network": "amex",
"number": "3774 650344 83859",
"cvv": "4071",
"expiry": "09/30",
"cardholderName": "DAVID ANDERSON"
},
{
"network": "mastercard",
"number": "5130 6951 7003 1933",
"cvv": "882",
"expiry": "06/28",
"cardholderName": "ROBERT SMITH"
}
]Gateway test cards
Canonical published numbers your payment provider documents for sandbox testing. Unlike the seeded generator above, these map to specific gateway behaviours.
| Number | Network | Triggers | Source |
|---|---|---|---|
| 4242 4242 4242 4242 | visa | Successful payment | Stripe |
| 4000 0000 0000 0002 | visa | Generic decline | Stripe |
| 4000 0000 0000 9995 | visa | Decline — insufficient funds | Stripe |
| 4000 0000 0000 0069 | visa | Decline — expired card | Stripe |
| 4000 0000 0000 0127 | visa | Decline — incorrect CVC | Stripe |
| 4000 0025 0000 3155 | visa | 3D Secure authentication required | Stripe |
| 5555 5555 5555 4444 | mastercard | Successful payment | Stripe |
| 2223 0031 2200 3222 | mastercard | Successful payment (2-series) | Stripe |
| 5200 8282 8282 8210 | mastercard | Successful debit card | Stripe |
| 3782 822463 10005 | amex | Successful payment | Stripe |
| 3714 496353 98431 | amex | Successful payment | Stripe |
| 6011 1111 1111 1117 | discover | Successful payment | Stripe |
| 6011 0009 9013 9424 | discover | Successful payment | Stripe |
| 3566 0020 2036 0505 | jcb | Successful payment | Stripe |
| 3056 930009 020004 | diners | Successful payment | Stripe |
Reproducible by design
Built on a seeded random generator: the same seed always produces the same cards, so you can commit a fixture, share a URL, or write a test that expects exact numbers. Every number is Luhn-valid with the correct BIN prefix and length for its network.
For payment testing only
These numbers exercise card form layout, length and CVV rules, Luhn validation, and network detection. They are not real accounts. For end-to-end gateway flows, use the canonical Gateway test cards above.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related tools
- Changelog GeneratorGenerate changelog from Git commit history
- Component Name GeneratorTurn a description into ranked, kind-aware component names with a file scaffold and a name validator (casing, collisions, clarity)
- Heroku Procfile GeneratorBuild a Heroku Procfile and matching app.json — process types, env vars, addons, dyno formation — plus a Procfile parser and audit
- Markdown TOC GeneratorGenerate table of contents for Markdown
- Package.json Scripts GeneratorGenerate common npm scripts for different project types and workflows
- Tailwind Config GeneratorVisually build a Tailwind config - theme extend, colors, spacing, fonts, screens, plugins - and export it as a v3 JS config or a v4 @theme CSS block
No. They are generated to pass the Luhn checksum and use valid issuer prefixes, but they are not linked to any real account and will be declined by any payment processor. They are strictly for development, QA, and form-validation testing.
The seed is the input to a deterministic pseudo-random generator. Given the same seed, the tool walks the exact same sequence of choices, so it produces byte-for-byte identical cards every time - same numbers, CVVs, expiries, and names. Change the seed (or click Regenerate, which picks a new random seed) and you get a completely different but equally stable batch. This is what makes the output reproducible across machines and safe to rely on in tests.

