Test card number generator
Generate fake payment card numbers with a valid Luhn checksum for testing forms.
Test card number generator
This tool generates fictional payment card numbers that pass the Luhn (mod 10) checksum — the same structural check every real card validator runs — so you can test checkout forms, payment integrations and client-side validation without touching a real card. Every number is fabricated: it carries no funds, is tied to no account and cannot be charged. Use it whenever a staging environment, a QA script or a form demo needs something that looks and validates like a card number without being one.
Pick a brand — Visa, Mastercard, American Express, Discover or JCB — and the generator produces numbers with that brand's published prefix (IIN) and length, so brand-detection logic in your form gets exercised too. Set how many to generate at once, choose whether the digits print grouped in fours like a physical card or run together continuously, and optionally add a random future expiry date and a CVV (four digits for Amex, three for the rest). Output as a plain list, one card per line, or as CSV with a header row ready to paste into a spreadsheet or a test fixture file.
The check digit is computed for real using the Luhn algorithm, not picked at random, so results are structurally indistinguishable from a genuine card number to any validator that only checks the checksum and format — which is the point. No prefix here is looked up against a real issuer's BIN range, and nothing is ever transmitted anywhere to verify it against an actual account.
Everything runs locally in your browser using the Web Crypto API for randomness. Nothing you generate is uploaded or logged anywhere. Copy the result, download it as a .txt file, clear it and start over, or send the output straight into another tool's input to keep testing.