Random Credit Card Generator
Create reproducible Luhn-valid test credit card numbers for QA and development. Supports Visa, Mastercard, American Express, or mixed networks. Choose formatted or plain output.
Also known as: card number generator · test card · fake card
seeded · synthetic data
Presets
Output
About this tool, tips & examples
What it does
The Random Credit Card Generator produces Luhn-valid test card numbers for Visa, Mastercard, American Express, or a mixed batch — up to 1,000 per run, formatted with spaces or as plain digits. The check digit is calculated correctly, so the numbers pass client-side validation, while being entirely fictional: they are not connected to any account and cannot make payments.
Common use cases
- Payment form testing — numbers that pass Luhn and network-prefix checks so you can exercise the happy path of your validation.
- QA fixtures — reproducible card columns for checkout-flow test suites (presets for Visa, mixed, and formatted batches).
- Demo data — masked-card displays and payment-method lists in demo environments.
- Parser testing — spaced and plain formats exercise normalization code.
Settings
- Network — Visa, Mastercard, American Express, or mixed; each uses its real prefix and length rules.
- Format — spaced (
4111 1111 …) or plain digits. - How many — 1 to 1,000 numbers per run.
- Seed — identical seed + settings = identical numbers, so fixtures never drift.
Privacy note
Numbers are generated locally in your browser and never uploaded. These are not real credit cards: they follow the format and checksum rules but belong to no one, hold no funds, and will be declined by any real payment processor. Never present them as payable instruments.
FAQ
Will these pass my form validation? Yes — Luhn checksum and network prefixes are correct, which is the point: your format validation should accept them, and your payment processor should decline them. Both halves are worth testing.
Should I use these against a live payment gateway? Use your gateway’s own documented test cards in its sandbox — processors publish specific numbers with defined behaviors (approve, decline, 3DS). This tool is for the layers before the gateway.
Can I get expiry dates and CVVs too? This tool focuses on the number itself. Pair with Random Date for expiry fixtures; any 3–4 digit value works as a test CVV in most sandboxes.