Random Credit Card Generator

Generate fake, Luhn-valid credit card numbers for testing — not real cards, cannot be used for purchases.

This tool runs entirely in your browser. Your files are never uploaded to a server.

For software testing only. These numbers pass the Luhn checksum but are not issued by any bank and cannot be used for real purchases.
4998 1642 2883 3612
4990 8377 7055 8921
4407 2738 9152 4724
4048 3012 3550 9500
4291 4114 8514 0502

What this tool does

Generates syntactically valid, Luhn-checksum-passing credit card numbers in Visa, Mastercard, American Express and Discover formats, for testing payment forms, checkout flows and validation logic without touching real card data.

How to use it

Choose a card network and how many numbers you want (up to 50), then copy an individual number or the full list. Use Regenerate for a fresh batch with the same network and count.

Worked example

Selecting Visa with a count of 1 produces a 16-digit number that starts with 4 and ends with a Luhn check digit computed from the preceding 15 digits, for example 4539 1488 0343 6467 — it passes the same checksum real issuers use while remaining entirely fabricated.

Formula: the Luhn checksum

Starting from the rightmost digit and moving left, every second digit is doubled; if doubling produces a two-digit result, its digits are added together (equivalently, 9 is subtracted). The check digit is whatever value makes the total of all digits a multiple of 10. This is the same public, non-secret algorithm card issuers use to catch simple typos — it does not verify that an account exists.

Not real cards — legitimate use only

Every number is generated locally from random digits plus a correct checksum, with no connection to any real account, cardholder or bank. These numbers cannot be charged and will be declined by any real payment processor. This tool exists to support development and QA work — the same purpose served by the test/sandbox card numbers payment gateways like Stripe and PayPal publish for developers — and must not be used to attempt fraud or to probe real payment systems.

Card formats

Visa numbers here are 16 digits starting with 4. Mastercard numbers are 16 digits starting with 51-55. American Express numbers are 15 digits starting with 34 or 37. Discover numbers start with 6011. Each format matches only that network's length and prefix pattern, not other issuer-specific rules.

Scope, sources and privacy

The Luhn algorithm is documented in ISO/IEC 7812; card length and prefix patterns are published by the payment networks. This tool checks numeric format validity only, not whether a number could be assigned to a real account. Generation runs locally in your browser using the Web Crypto API for digit randomness; Quiklio never transmits or stores generated numbers.

Frequently Asked Questions

Are these real credit card numbers?
No. Every number is randomly generated purely for testing purposes. These are fake numbers that are not tied to any real account, cannot be used to make purchases, and will be rejected by any real payment system.
What does 'Luhn-valid' mean?
The Luhn algorithm is the checksum formula real card issuers use to catch typos in card numbers. Our generated numbers pass this same checksum, so they look and behave like real numbers to basic format validation — which is exactly what makes them useful for testing.
What card formats can I generate?
You can generate numbers in Visa, Mastercard, American Express, and Discover formats, each matching that network's correct number length and starting digit pattern.