About Test Credit Card Numbers — Luhn-Valid Generator
This generator produces Luhn-valid **test** credit-card numbers for Visa, Mastercard, American Express, and Discover. Each number uses its brand's real IIN prefix and length and a correctly computed Luhn check digit, so it passes the same client-side validation your checkout form runs — without being a real card.
These are dummy card numbers for QA only. They come from well-known, non-functional test ranges: they cannot make payments, never charge, and are not linked to any account. Use them to exercise payment forms, validators, and edge cases when you need data that looks real but is completely safe.
Everything runs locally in your browser using cryptographically-strong randomness. No card numbers are generated on or sent to a server.
Features
- Luhn-valid test numbers for Visa, Mastercard, Amex, and Discover
- Correct IIN prefix and length per brand, with a computed check digit
- Bulk generation with copy-all, grouped into readable 4-digit blocks
- Fully offline — non-functional test data, never real cards
How to use
- Pick a card scheme: Visa, Mastercard, Amex, or Discover.
- Set how many numbers you want, then press Generate.
- Copy a single number, or use Copy all for the whole list.
Frequently asked questions
Are these real credit-card numbers?
No. They are test-only, non-functional numbers from well-known dummy ranges. They are structurally valid (correct prefix, length, and Luhn check digit) but cannot make payments and are not tied to any account. Use them strictly for testing.
Why do they pass validation if they are fake?
Most checkout forms validate a card number locally using the Luhn algorithm and the brand prefix/length before contacting a payment gateway. These numbers satisfy that structure, so they let you test your form logic. A real gateway will still decline them.
What is the Luhn check digit?
Luhn is a checksum that catches single-digit typos in card numbers. The final digit is computed from the rest so the whole number passes the Luhn formula. Every number here includes a correctly calculated check digit.
Is this safe and private?
Yes. Generation happens entirely in your browser using the Web Crypto API. Nothing is uploaded, and because the numbers are non-functional test data there is no financial risk in sharing them with your test environment.
Related tools
Everything runs locally in your browser — your input is never uploaded.