Credit Card Generator
Generate Luhn-valid fake card numbers for software testing and QA only. No signup. These are not real cards and hold no funds; use only for legitimate testing, never fraud.
Share on Social Media:
A credit card generator makes fake card numbers for software testing — numbers that look correctly formatted and pass the Luhn checksum, but are not real cards, are linked to no account, and hold no funds. This one is free with no signup: pick a card brand, an expiry date and a CVV, choose how many numbers you want, and it generates them for legitimate testing and QA only. These numbers cannot pay for anything, and they must never be used to try.
On this page
- How to Generate Test Card Numbers Step by Step
- What These Test Numbers Are
- Test Numbers Versus Real Cards
- Who Uses Test Card Numbers
- Pro Tips for Test Card Numbers
- Important Things to Keep in Mind
- Related Tools You May Need Next
- Frequently Asked Questions
How to Generate Test Card Numbers Step by Step
- Pick a card type. Choose Visa, Mastercard, American Express, Discover or JCB — or leave it on Random and the tool picks a brand for each card, so one run can give you a mix of brands.
- Set the expiry month and year. Pick a month from 1 to 12 and a year from 2025 to 2034, or leave both on Random. Random expiry dates always land in the future. If you set the year yourself, avoid 2025 and any past month, or you will get an already-expired test card.
- Set the CVV — or leave it blank. Leave the CVV box empty for a random code, or type a number to use the same CVV on every card. A fixed CVV is useful when you want repeatable test data.
- Choose the quantity. Pick 5, 10, 15, 20, 25, 30, 35, 40, 45 or 50 numbers. Random gives you a random-sized batch instead, so pick an exact number when you need to know how many you will get.
- Click Generate. The form is sent to the server and the results come back on the same page. There is nothing to install and no account to create.
- Read each result card. Every card shows its own number, a randomly generated fake holder name, a CVV and an expiry date written as month/year, for example 3/2028. The holder name is made up by the tool — there is no box to type your own name.
- Copy one card at a time. Each card has its own Copy to Clipboard button. There is no copy-all or download button, so copy the cards you need individually.

What These Test Numbers Are
These are fake credit card numbers made for one purpose: testing software. A developer building a payment form or a checkout flow needs card numbers that look right and pass the basic format checks, without ever touching a real card. These numbers do exactly that. They follow each brand's number pattern and they pass the Luhn checksum — the simple maths check that real card numbers also pass — so your form treats them as correctly formatted input.
Passing that check is all they do. A generated number is linked to no bank account, no person and no money. It cannot be charged, it cannot buy anything, and no payment system will accept it as a real card. Luhn-valid means "correctly formatted", not "real". That distinction is the whole point of the tool, and it is why the numbers are safe to use in testing and useless for anything else.
What each card brand gives you
Every brand has its own number length, starting digits and grouping. These are the formats this tool actually produced when tested live:
| Card type | Digits | Starts with | Grouping | CVV (random) |
|---|---|---|---|---|
| Visa | 16 | 4 | 4-4-4-4 | 3 digits |
| Mastercard | 16 | 51–55, or 25–27 (the 2-series) | 4-4-4-4 | 3 digits |
| American Express | 15 | 34 or 37 | 4-6-5 | 4 digits |
| Discover | 16 | 6011 in the test run | 4-4-4-4 | 3 digits |
| JCB | 16 | 3528 or 3589 | 4-4-4-4 | 3 digits |
American Express is the odd one out: 15 digits instead of 16, grouped 4-6-5 instead of 4-4-4-4, and a 4-digit CVV instead of 3. That makes it the best brand to test with if your form has to handle more than one card format — a form that only accepts 16-digit numbers will fail an Amex test number, which is exactly the kind of bug test numbers are meant to catch.
Worked example: five live test runs
The tool was tested live with five separate runs, one per brand, and every number was re-checked against the Luhn checksum:
| Test run | Numbers asked for | Numbers received | Format seen | Luhn-valid |
|---|---|---|---|---|
| Visa, all options random | 5 | 5 | 16 digits, starting with 4, random 3-digit CVV, random future expiry | 5 out of 5 |
| Mastercard, month 3, year 2028, CVV 123 | 10 | 10 | 16 digits, prefixes 51–55 and 25/27 — every card showed expiry 3/2028 and CVV 123 | 10 out of 10 |
| American Express, quantity Random | Random | 13 | 15 digits, starting 34 or 37, grouped 4-6-5, random 4-digit CVV | 13 out of 13 |
| Discover, all options random | 5 | 5 | 16 digits, all starting with 6011, random 3-digit CVV | 5 out of 5 |
| JCB, all options random | 5 | 5 | 16 digits, starting 3528 or 3589, random 3-digit CVV | 5 out of 5 |
Two things in that table are worth noticing. First, fixed options are honoured exactly: asking for month 3, year 2028 and CVV 123 gave all ten Mastercard numbers the same expiry and the same CVV, so you can build repeatable test data. Second, Quantity set to Random gave 13 numbers in one run and 50 in another — the count varies widely, so choose an exact quantity when the number of cards matters to your test.
What "Luhn-valid" means, worked out
The Luhn checksum is a simple digit test. Take a number, work from the rightmost digit, double every second digit (and subtract 9 if doubling gives more than 9), then add everything up. If the total divides evenly by 10, the number passes. Here it is on 4242 4242 4242 4242 — a well-known public test number published by payment gateways for exactly this kind of demonstration, not a number this tool generated:
| Step | What happens | Result |
|---|---|---|
| Keep every second digit from the right | The eight 2s stay as they are | 8 × 2 = 16 |
| Double the other eight digits | Each 4 becomes 8 | 8 × 8 = 64 |
| Add them together | 16 + 64 | 80 — divides by 10, so the number is Luhn-valid |
Every number this tool generates passes the same test — 38 out of 38 in the live runs above. But passing it only proves the digits are arranged correctly. It says nothing about whether an account exists behind the number, and for these test numbers there is none.
Remember: each result card bundles a full-looking set — number, expiry, CVV and holder name — so it looks like a complete card. It is not one. The numbers are fake test data, they hold no funds, and they cannot make any payment.
Test Numbers Versus Real Cards
| Aspect | Test numbers from this tool | Real cards |
|---|---|---|
| Real? | Fake test data, made up on the spot | Real, issued by a bank and linked to an account |
| Passes the Luhn checksum? | Yes — that is what makes them useful for testing | Yes |
| Number format | Matches the brand: right length, right starting digits, right grouping | Matches the brand |
| Funds | None — holds nothing | Access to the account's funds or credit |
| Can it pay? | No, never | Yes |
| Holder name | Randomly generated fake name, sometimes with a title such as Dr. or Prof. | The real cardholder's name |
| Use it for | Legitimate software testing and QA only | Actual transactions |
The useful row in that table is the second one. Because test numbers pass the same format check as real ones, they exercise your form's validation logic the same way a real number would — your code cannot tell the difference by looking at the digits. The difference only appears when money is involved, which is why these numbers belong in a test environment and nowhere else.
Who Uses Test Card Numbers
Developers testing payment forms. A developer building a payment or checkout form uses fake Luhn-valid numbers to check the form validates card formats correctly, without ever typing in a real card.
QA testers checking validation. A QA tester uses test numbers to verify that validation accepts correctly formatted numbers and rejects invalid ones, as part of a test plan.
People building checkout flows. Someone building a checkout flow uses fake numbers to test how it handles card input — different brands, different lengths, Amex's 15 digits — during development.
People testing card format handling. A developer testing that software handles card number formats correctly uses these numbers because they pass the format checksum, so the happy path behaves like production.
Anyone doing legitimate QA. A person doing legitimate software QA who needs test card numbers uses these fake numbers strictly for testing, never for anything real.

Pro Tips for Test Card Numbers
Fix the expiry and CVV for repeatable tests. Set a month, a year and a CVV yourself and every card in the batch comes back with the same values — the live test gave ten Mastercards all showing 3/2028 and CVV 123. Repeatable data makes failing tests easier to reproduce.
Test Amex as well as Visa. Amex is the only 15-digit brand here, with 4-6-5 grouping and a 4-digit CVV. If your form only handles 16-digit cards, an Amex test number will expose that before your users do.
Pick an exact quantity. Quantity set to Random gives a random-sized batch — 13 cards in one test run and 50 in another. Choose 5, 10, 15 or more when your test needs a known number of cards.
Test the unhappy path too. These numbers check that your form accepts good input. Also test that it rejects bad input: a number with a digit changed so it fails the Luhn check, a past expiry date, or a CVV that is too short.
Use them only for legitimate testing. These fake numbers are strictly for legitimate software testing and QA, such as validating card format handling, and for no other purpose.
Combine with other test-data tools. For matching test data, our Fake Name Generator and Fake Address Generator create other fictional details for legitimate testing.
Important Things to Keep in Mind
Trying to use them for a real payment. These numbers are fake and cannot make real payments; they hold no funds and are linked to no account. Attempting to pay with fake card numbers will not work, and trying to do so would be fraud, which is wrong and illegal. Use them only for legitimate testing.
Thinking Luhn-valid means real. These numbers only pass the basic format checksum. Passing a format check does not make a number a working card, and it never will. They are fake test data that merely look correctly formatted.
Picking an expired date by hand. The year dropdown starts at 2025, so choosing 2025 — or a month that has already passed — produces an already-expired test card. Leave the expiry on Random, or pick a future year, unless an expired card is exactly what you want to test.
Using one number for every test. One number cannot test brand handling, length checks or CVV rules. Generate a small batch across brands — Visa, Mastercard and at least one Amex — so each format gets exercised.
Using them outside legitimate testing. These fake numbers are exclusively for legitimate software testing and QA. Using them for deception, fraud or any dishonest or unauthorised purpose is wrong and illegal, and it cannot work anyway.
Related Tools You May Need Next
Test data rarely stops at a card number. These tools cover the rest of a test checkout or a test record:
Fake Name Generator. Random fake names for test accounts and test records.
Fake Address Generator. Fictional addresses to pair with test data.
Credit Card Validator. Check whether a card number passes the Luhn checksum and which brand its digits match.
UUID Generator. Unique identifiers for test records and database rows.
Password Generator. Strong random passwords for test accounts.
Random Number Generator. Random numbers for test data and sampling.

Frequently Asked Questions
How do I generate test card numbers?
Choose a card type, an expiry month and year, and a CVV — or leave any of them on Random — then choose a quantity and click Generate. Each result card shows a number, a fake holder name, a CVV and an expiry date, with its own Copy to Clipboard button. Use the numbers only for legitimate software testing and QA.
What are these test numbers?
Fake credit card numbers for software testing and quality assurance. They are Luhn-valid, so they pass the basic checksum real card numbers use, which makes them useful for testing that software handles card number formats correctly. They are not real cards, are not linked to any account, and hold no funds.
Can these numbers make real payments?
No. They absolutely cannot make real payments. They are entirely fake, linked to no account and holding no funds. They only pass the basic Luhn checksum, which makes them useful for testing format validation — not for paying for anything. Attempting to use them for a real payment would not work and would be fraud.
What is a Luhn-valid number?
A number that passes the Luhn checksum, a simple formula that checks whether card digits are arranged correctly. Real card numbers follow it, so software often uses it as a first check, rejecting numbers that fail before any further processing. Luhn-valid means correctly formatted — it does not make a number real or working.
Which card brands can I generate?
Five: Visa (16 digits, starts with 4), Mastercard (16 digits, starts 51–55 or 25–27), American Express (15 digits, starts 34 or 37), Discover (16 digits, starts with 6011 in the test run) and JCB (16 digits, starts 3528 or 3589). You can also leave the brand on Random — the tool picks a brand for each card, so one run can give you a mix of brands.
How many numbers can I generate at once?
From 5 to 50 in steps of 5, or a random-sized batch if you leave Quantity on Random — one test run with Random produced 13 numbers and another produced 50. Pick an exact quantity when you need a known count.
Does it generate an expiry date and CVV too?
Yes. Every card comes with an expiry date and a CVV. Random expiry dates always land in the future, and you can fix both yourself: pick a month and year, type a CVV, and every card in the batch uses those exact values. Amex cards get a 4-digit CVV when the CVV is random; the other brands get 3 digits. If you type a 4-digit CVV for a 16-digit brand, the tool uses it as typed — it does not trim it to 3 digits.
Does it generate a cardholder name?
Yes, but you cannot type your own — each card gets a randomly generated fake name, sometimes with a title such as Dr. or Prof. If you need a specific test name, use the Fake Name Generator alongside it.
Who should use test card numbers?
Only developers and QA testers doing legitimate software testing — people building or testing payment forms, checkout flows or validation logic who need correctly formatted card numbers without using a real card. They must never be used for real payments, deception or fraud.
Are these numbers safe and legal to use?
They are safe and legal only for their intended purpose: legitimate software testing and quality assurance. Because they are fake, hold no funds and are linked to no account, using them to test format validation is legitimate. Using them for anything else — especially attempting real payments, deception or fraud — is not legitimate and would be against the law.
Is the credit card generator free?
Yes, it is free with no account and no signup. You can generate test cards up to 50 times a day as a guest, or 1,000 times a day when signed in. The numbers are fake test data for legitimate software testing and QA only.