Random Credit Card Generator
Pick a card brand and get a Luhn-valid test card number with a cardholder name, expiry date and CVV, ready to copy or download.Pick a card brand, press the button, and you get a test credit card number with the right prefix and length for that brand, a cardholder name, an expiry date and a CVV. The number passes the Luhn checksum, so it gets through the format validation on a checkout form, but it is not linked to any account and cannot be charged. It exists for developers and QA testers who need realistic card data without touching a real card.
What you can choose
The only option is the card brand. The dropdown lists 32 networks: Visa, Visa Electron, Mastercard, Maestro, Maestro (UK), American Express, Discover, JCB, China UnionPay, China T-Union, RuPay, Diners Club (International, enRoute and US & Canada), Mir, Troy, Verve, UATP, Dankort, Bankcard, BORICA, InterPayment, InstaPayment, Laser, Solo, Switch, UkrCard, UzCard, Humo, LankaPay, NPS Pridnestrovie and GPN. Each brand has its own issuer identification number (IIN) prefixes and allowed lengths stored in the tool, and every press picks one prefix and one length at random from that brand's list. If you need a Mastercard, choose Mastercard and you'll get a number starting with 51–55 or 2221–2720, 16 digits long. Choose UnionPay and you'll get one starting with 62, anywhere from 16 to 19 digits.
What the card shows
The result is drawn as the front and back of a card. The front carries the number (grouped in fours with dashes), an expiry date between one and ten years in the future, the cardholder's name and the brand logo. The back carries a three-digit CVV. The Copy Card button puts the number, brand, name, a fake billing address, CVV and expiry on your clipboard as plain text; Download Card saves the same text as a .txt file named after the card number. The name and address come from a faker library, so they are invented, not sampled from real people.
How the number is built
Every card network reserves certain leading digits. The tool takes one of the brand's prefixes, fills the remaining positions with random digits, and then computes the final digit with the Luhn algorithm, the same mod-10 check used by real issuers. That is why the output validates in Stripe test forms, checkout plugins and your own regex checks. What it does not do: it doesn't pick real bank BINs within a range, it doesn't produce a number that any processor will authorize, and the CVV and expiry are random rather than derived from the number. Anything past format validation will reject it, which is exactly what you want from test data.
| Brand | Prefixes used | Length |
|---|---|---|
| Visa | 4 | 13 or 16 |
| Visa Electron | 4026, 417500, 4508, 4844, 4913, 4917 | 16 |
| Mastercard | 51–55, 2221–2720 | 16 |
| American Express | 34, 37 | 15 |
| Discover | 6011, 644–649, 65, 622126–622925 | 16–19 |
| JCB | 3528–3589 | 16–19 |
| China UnionPay | 62 | 16–19 |
| Diners Club International | 36, 300–305, 3095, 38–39 | 14–19 |
| Diners Club US & Canada | 54, 55 | 16 |
| Maestro | 5018, 5020, 5038, 5893, 6304, 6759, 6761–6763 | 12–19 |
| RuPay | 60, 65, 81, 82, 508, 353, 356 | 16 |
| Mir | 2200–2204 | 16–19 |
| Troy | 65, 9792 | 16 |
| Verve | 506099–506198, 507865–507964, 650002–650027 | 16, 18 or 19 |
| UATP | 1 | 15 |
| Dankort | 5019, 4571 | 16 |
The remaining brands (Bankcard, BORICA, China T-Union, Diners Club enRoute, InterPayment, InstaPayment, Laser, Maestro UK, Solo, Switch, UkrCard, UzCard, Humo, LankaPay, NPS Pridnestrovie and GPN) follow the same pattern with their own prefixes. Several of these networks are discontinued or regional, which makes them useful for testing how your form handles unfamiliar BINs.
Where this fits in a test setup
- Checkout form validation. Generate a Visa, then an Amex, and confirm your form formats 16-digit and 15-digit numbers correctly and detects the brand from the prefix.
- Sandbox payment gateways. Most gateways accept any Luhn-valid number in sandbox mode. Pair a generated card with a fake bank account number or routing number when your flow also collects ACH details.
- Seeding a database. Copy several cards into a fixtures file so your staging environment has customers with mixed card brands.
- Design mockups. The rendered card is a quick way to get a plausible number and name for a screenshot without blurring a real card.
If you specifically need debit-style output, the Debit Card Generator works the same way, and the RuPay Credit Card Generator is limited to the Indian network. A generated card usually needs an email on the same test account; the Random Email Generator covers that. Browse all developer & test data tools for the rest of the set.
Frequently asked questions
- Are these real credit card numbers?
No. The numbers follow the correct prefix, length and Luhn check digit for the brand, but they are not issued by any bank and have no balance. A live payment processor will decline them.
- Will a generated card work for a free trial?
Format checks may accept the number, but any service that runs an authorization against the card network will reject it. Using fabricated card details to obtain a paid service is also a breach of most terms of service, so use these only for development and testing.
- Can I generate a specific brand like Mastercard or UnionPay?
Yes. Choose the brand from the dropdown before pressing Generate. Each brand uses its own prefix list and lengths; Mastercard is always 16 digits, UnionPay can be 16 to 19.
- Why does the Visa number sometimes have 13 digits?
Visa historically issued 13-digit cards alongside the 16-digit ones, and the tool picks either length at random. If your form only accepts 16 digits, generate again.
- Does the CVV or expiry date match the card number?
No. Real CVVs are computed by the issuer from the card data; here the CVV is three random digits and the expiry is a random month between one and ten years from now.



