testing · 2025-02-03 · 6 min read
Why 4242 4242 4242 4242 is famous: how sandbox test numbers work
Payment providers publish fixed test numbers so developers never touch a real card. Here is how they behave, where to find them, and why they fail in production.

Every sandbox environment ships with documented numbers that behave predictably: one that always succeeds, one that is always declined, one that triggers 3-D Secure, one that fails the CVC check, and so on. This lets you test every branch of your checkout without a real card ever touching your code. Our test-numbers section collects the most useful ones.
The famous one
4242 4242 4242 4242 is Stripe's default Visa test number. It passes Luhn, sits in a Visa-looking range, and succeeds with any future expiry and any three-digit CVC. It became a de-facto industry meme simply because Stripe's documentation is so widely read.
Where each provider publishes theirs
- Stripe testing docs — brands, declines, 3DS, disputes.
- Braintree test values — card numbers plus amount-based triggers.
- PayPal sandbox cards — including a generator for negative cases.
- Adyen, Checkout.com, Square and others each publish equivalents.
Why they look real but are not
Test numbers reuse real network prefixes so brand detection works, and their check digit is correct. But they map to no account at any bank. A live gateway rejects them instantly — which is also why mixing test and live API keys is the most common launch-day bug (sandbox vs. live mode).
Use them, and nothing else. Typing a real card into any page that is not an authorized payment form is both unsafe and, under PCI DSS, a prohibited exposure of cardholder data.

Keywords: test credit card numbers, 4242 4242 4242 4242, Stripe test cards, sandbox card numbers, Braintree test cards, PayPal sandbox
Frequently asked questions
Does 4242 4242 4242 4242 work on real websites?
No. It only works in payment providers' test modes. Live gateways decline it.
What CVC and expiry should I use with test cards?
Any future expiry date and any 3-digit CVC (4 digits for American Express test numbers).