Why use Fake Credit Card Number Generator
This tool makes card numbers that look right to a form and mean nothing to a bank. Each number starts with the chosen network's prefix, has the correct length (16 digits, or 15 for American Express) and ends in a check digit that satisfies the Luhn algorithm, so client-side validators accept it. You can add a random CVV of the right length and switch digit grouping on or off. The numbers are not linked to any account, so any real charge is declined, and they are not sandbox cards either: a payment provider's test mode normally accepts only that provider's own published numbers. Use these for input masks, brand detection, validation rules and demo screenshots.
Card number formats by network: prefix, length and CVV
The real numbering rules, and the subset this tool generates.
| Network | Real prefixes | Usual length | Security code | What this tool generates |
|---|---|---|---|---|
| Visa | 4 | 16 digits | 3 digits | Starts with 4, 16 digits, grouped 4-4-4-4 |
| Mastercard | 51 to 55 and 2221 to 2720 | 16 digits | 3 digits | Starts with 51 to 55 only, 16 digits, grouped 4-4-4-4 |
| American Express | 34 and 37 | 15 digits | 4 digits | Starts with 34 or 37, 15 digits, grouped 4-6-5 |
| Discover | 6011, 644 to 649 and 65 | 16 digits | 3 digits | Starts with 6011 only, 16 digits, grouped 4-4-4-4 |
Mastercard 2-series numbers, 19-digit numbers and other networks such as JCB, Diners Club and UnionPay are not generated.
Sample Luhn-valid test numbers from the tool
Real output from single runs. Every one passes the Luhn check and none is a working card. Your own results will differ each time you press Generate.
Visa with CVV
Card network: Visa, Include a CVV: on, Group digits with spaces: on
4348 5307 9849 8969 | CVV 243 4867 7640 3271 2064 | CVV 932
Mastercard with CVV
Card network: Mastercard, Include a CVV: on, Group digits with spaces: on
5534 8530 7984 9895 | CVV 624 5278 6776 4032 7127 | CVV 069
A CVV can start with zero, so store it as text, not as a number.
American Express, 15 digits and a 4-digit code
Card network: American Express, Include a CVV: on, Group digits with spaces: on
3734 853079 84981 | CVV 9624 3478 677640 32714 | CVV 2069
Discover with CVV
Card network: Discover, Include a CVV: on, Group digits with spaces: on
6011 3485 3079 8492 | CVV 896 6011 4378 6776 4035 | CVV 271
Plain digits for a test fixture
Card network: Visa, Include a CVV: off, Group digits with spaces: off
4348530798498969 4437867764032717
How the Luhn check digit is calculated
check digit = (10 - (sum of the processed digits mod 10)) mod 10
Take every digit except the last. Starting from the right-hand end of that string, double every second digit, beginning with the rightmost one. If doubling gives a number above 9, subtract 9. Add the processed digits together, and choose the final digit that brings the grand total to a multiple of 10. Worked example with 4348 5307 9849 8969. The first 15 digits are 4 3 4 8 5 3 0 7 9 8 4 9 8 9 6. Doubling every second digit from the right turns them into 8 3 8 8 1 3 0 7 9 8 8 9 7 9 3, which add up to 91. The next multiple of 10 is 100, so the check digit is 9. Change that last digit to 8 and the total becomes 99, so 4348 5307 9849 8968 fails validation. The method was devised by IBM engineer Hans Peter Luhn, whose patent was granted in 1960. It catches any single mistyped digit and most swaps of two neighbouring digits. It is an error check, not a security feature.
Published sandbox test cards (Stripe test mode)
If you are testing against a payment provider's sandbox, use the numbers from that provider's documentation. These are the basic success cards listed in Stripe's testing guide; they accept any future expiry date.
| Brand | Test number | CVC |
|---|---|---|
| Visa | 4242 4242 4242 4242 | Any 3 digits |
| Mastercard | 5555 5555 5555 4444 | Any 3 digits |
| Mastercard (2-series) | 2223 0031 2200 3222 | Any 3 digits |
| American Express | 3782 822463 10005 | Any 4 digits |
| Discover | 6011 1111 1111 1117 | Any 3 digits |
These work only with Stripe test API keys. Other providers publish their own lists, so check the documentation for the one you use.
What generated numbers can and cannot test
- Can test: Luhn validation in your own form or back-end code, including that a one-digit typo is rejected.
- Can test: card-brand detection from the first digits, and switching the logo, number mask and CVV length for American Express.
- Can test: input formatting, such as automatic spacing, paste handling and maximum length.
- Can test: demo screens, training material and screenshots that must not show a real card.
- Cannot test: authorisation, declines, 3D Secure, refunds or anything that needs a response from a payment provider. Use the provider's sandbox cards for those.
- Cannot test: expiry date handling with generated data, because the tool does not produce an expiry date. Enter any future month and year by hand.
How to use it
- 1
Choose a Card network: Visa, Mastercard, American Express or Discover.
- 2
Set How many numbers you want, from 1 to 20.
- 3
Tick Include a CVV to add a random 3-digit code, or 4 digits for American Express.
- 4
Tick Group digits with spaces for 4-4-4-4 display (4-6-5 for American Express), or untick it for plain digits.
- 5
Press Generate, then copy the Plain text list or download fake-credit-cards.txt.