Test Credit Card Generator

Stripe-style test card numbers — successful charges, declines, 3DS challenges. Valid Luhn, never charges.

Brand
Scenario
VisaSuccessful charge

4242 4242 4242 4242

exp 12 / 34cvc 123

Stripe's canonical test card. Recognised by most gateways.

VisaSuccessful charge — debit

4000 0566 5566 5556

exp 12 / 34cvc 123

Visa debit, succeeds.

MastercardSuccessful charge

5555 5555 5555 4444

exp 12 / 34cvc 123

Standard Mastercard test card.

Mastercard2-series, succeeds

2223 0031 2200 3222

exp 12 / 34cvc 123

Mastercard 2-series range (newer BINs).

AmexSuccessful charge

3782 822463 10005

exp 12 / 34cvc 1234

Amex format: 15 digits, 4-digit CVC.

DiscoverSuccessful charge

6011 1111 1111 1117

exp 12 / 34cvc 123

Discover test card.

VisaGeneric decline

4000 0000 0000 0002

exp 12 / 34cvc 123

Returns card_declined.

VisaInsufficient funds

4000 0000 0000 9995

exp 12 / 34cvc 123

Returns card_declined with insufficient_funds.

VisaExpired card

4000 0000 0000 0069

exp 12 / 34cvc 123

Returns expired_card.

VisaIncorrect CVC

4000 0000 0000 0127

exp 12 / 34cvc 123

Returns incorrect_cvc.

Visa3DS authentication required

4000 0025 0000 3155

exp 12 / 34cvc 123

Requires authentication via 3DS challenge.

MastercardGeneric decline (Mastercard)

5200 8282 8282 8210

exp 12 / 34cvc 123

Mastercard equivalent decline.

These card numbers only work against test/sandbox endpoints (Stripe, Adyen, Braintree, etc). They will never charge a real account. Use any future expiry date (e.g. 12/34) and any 3-digit CVC (4-digit for Amex).

01 — Overview

How the Test Credit Card Generator works

Generate test credit card numbers for development and QA. Numbers pass Luhn checksum validation and match the formats of real Visa, Mastercard, Amex, and Discover ranges — but they're the well-known test cards that gateways like Stripe, Adyen, and Braintree recognize and never actually charge. Includes specific scenarios: successful charges, generic declines, insufficient funds, 3DS required.

02 — Use cases

When to use the Test Credit Card Generator

  1. 01

    Test a checkout flow with success and decline scenarios

  2. 02

    Verify 3D Secure handling in your payments integration

  3. 03

    Seed a fixture file with brand-varied test cards

  4. 04

    Demo a refund flow without using a real card

03 — Examples

Test Credit Card Generator examples

Visa, success

ex 01

4242 4242 4242 4242 · exp 12/34 · cvc 123

The canonical Stripe test card for successful charges.

Visa, generic decline

ex 02

4000 0000 0000 0002 · exp 12/34 · cvc 123

Triggers a card_declined response in test mode.

Mastercard, success

ex 03

5555 5555 5555 4444 · exp 12/34 · cvc 123

Test card recognized by most major gateways.

American Express, success

ex 04

3782 822463 10005 · exp 12/34 · cvc 1234

Amex is 15 digits in a 4-6-5 grouping with a 4-digit CVC — a common layout bug.

Visa, insufficient funds

ex 05

4000 0000 0000 9995 · exp 12/34 · cvc 123

Returns a decline with an insufficient_funds code rather than a generic failure.

04 — FAQ

Test Cards — frequently asked questions

Will these cards ever charge a real account?

No. These numbers are the official test cards published by payment processors. They only work against test/sandbox endpoints and are rejected by production card networks.

Why does the card number pass Luhn but isn't real?

Luhn is just a checksum to catch typos — it doesn't certify a card is issued. The test card numbers were chosen to pass Luhn so they behave like real cards in client-side validation.

Do these work with non-Stripe gateways?

Most are universal — 4242…4242 is recognized by Stripe, Adyen, Braintree, and many others. A few (like 3DS-specific cards) are processor-specific; the tool labels which work where.

Is it legal to generate card numbers like this?

Yes. These are published test numbers — Stripe, Adyen, Braintree, and the card networks document them openly so developers can build checkout flows. They're valid in structure only; no issuer has ever assigned them to an account, so there's nothing to charge and nothing to steal.

What expiry date and CVC should I use?

Any future date works, which is why 12/34 is the convention. CVC is any three digits, or four for American Express — 123 and 1234 respectively. Gateways in test mode check the format, not the value, unless you're deliberately triggering a CVC-failure scenario.

How do I test 3D Secure and other challenge flows?

Those are provider-specific: each gateway reserves particular numbers to trigger an authentication challenge, a frictionless pass, or a failed authentication. The cards here cover the common success and decline paths; check your provider's testing documentation for the SCA-specific ones.

05 — Reference

Specs and further reading

The primary sources this tool follows. Where behaviour is defined by a specification, we link the specification rather than a summary of it.

  • Luhn algorithm

    Wikipedia — The check-digit formula every generated number satisfies.

  • ISO/IEC 7812-1:2024

    ISO — The standard defining issuer identification numbers and card number structure.

  • PCI Security Standards

    PCI SSC — Why test numbers, not real card data, belong in development environments.

07 — More

Tools that pair with Test Cards

Last updated .