consolelog.tools

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 cases

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

  1. 1Set a seed (any text) - the same seed always regenerates the same cards - or hit Regenerate for a fresh set.
  2. 2Choose a network (or Any / mixed) and how many cards to generate (1 to 100).
  3. 3Toggle CVV, expiry, cardholder name, spaced groups, and masking to shape the output.
  4. 4Pick an export format: JSON, NDJSON, CSV, SQL INSERT, or TypeScript.
  5. 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.

Preview5
3570 1037 1366 3389
Card Holder
MARY THOMAS
Valid Thru
02/29
CVV
503
jcb logo
3580 4367 0874 9658
Card Holder
JENNIFER ANDERSON
Valid Thru
04/29
CVV
295
jcb logo
5271 0180 7658 2447
Card Holder
EMILY BROWN
Valid Thru
08/31
CVV
802
3774 650344 83859
Card Holder
DAVID ANDERSON
Valid Thru
09/30
CVV
4071
amex logo
5130 6951 7003 1933
Card Holder
ROBERT SMITH
Valid Thru
06/28
CVV
882

Seed consolelog — same seed, same cards.

Generation

Any text — drives reproducibility

Count

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.

NumberNetworkTriggersSource
4242 4242 4242 4242visaSuccessful paymentStripe
4000 0000 0000 0002visaGeneric declineStripe
4000 0000 0000 9995visaDecline — insufficient fundsStripe
4000 0000 0000 0069visaDecline — expired cardStripe
4000 0000 0000 0127visaDecline — incorrect CVCStripe
4000 0025 0000 3155visa3D Secure authentication requiredStripe
5555 5555 5555 4444mastercardSuccessful paymentStripe
2223 0031 2200 3222mastercardSuccessful payment (2-series)Stripe
5200 8282 8282 8210mastercardSuccessful debit cardStripe
3782 822463 10005amexSuccessful paymentStripe
3714 496353 98431amexSuccessful paymentStripe
6011 1111 1111 1117discoverSuccessful paymentStripe
6011 0009 9013 9424discoverSuccessful paymentStripe
3566 0020 2036 0505jcbSuccessful paymentStripe
3056 930009 020004dinersSuccessful paymentStripe

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