Developer utilities / Test data
Create sample numbers for form testing
Generate Luhn-valid sample numbers for your input fields, or choose a published sandbox example. Copy a batch into your tests without using real customer data.
Build your test set
For a checkout integration, use your payment provider's documented test cards. A random checksum-valid number may be rejected by its sandbox.
Disclaimer: For software testing and educational use only. Generated numbers are synthetic test data, not bank-issued cards provided by this tool. Do not use them for real payments, purchases, account verification or any unlawful activity. Passing the Luhn checksum does not make a number an active or usable payment card.
Your test data
How to use the credit card generator
- Choose random form-testing data or a documented Stripe sandbox example.
- For random data, select a number format and a batch size from 1 to 100.
- Select Generate test data. The preview shows the first number; the list contains the full batch.
- Choose TXT, CSV or JSON, then copy or download. Keep card numbers as text when importing them into a spreadsheet.
This tool is for developers, testers and students checking input masks, validation messages and sample datasets. It is free and requires no account.
How test numbers are made
Random mode starts with a common network prefix, fills the remaining positions with random digits and calculates the final Luhn check digit. The last digit makes the weighted digit sum divisible by 10. Numbers in a single batch are distinct; numbers from different batches are not guaranteed to be unique.
Generated values are synthetic examples. They are not issued by ToolsRiver or connected to a bank account by this tool. Random mode does not generate a cardholder identity, billing address, expiry date or CVV. To test payment responses, follow your provider's sandbox instructions.
A test you can repeat
Stripe's Visa test number 4242 4242 4242 4242 has a Luhn total of 80, so it passes. Changing the last digit to 1 gives 79 and fails. These two inputs are useful for checking a form's success and error messages.
Frequently asked questions
Can these numbers be used to buy anything?
No. Use this tool only for development and education. A checksum is a mathematical check, not a payment credential or authorisation.
Why does my payment sandbox reject a random number?
Payment providers use specific test values to trigger particular outcomes. A randomly generated number can pass Luhn and still be unsupported in a sandbox. Use that provider's documented examples.
Will the same number appear again?
Random mode avoids duplicates within the current batch. It does not keep a history across visits. Documented sandbox examples repeat by design.
Which export should I choose?
TXT is easy to read, CSV works with test fixtures and spreadsheets, and JSON suits application code. Import the number column as text; spreadsheets can round long numeric identifiers.
Where are the sandbox examples from?
The named examples come from Stripe's testing documentation, checked on 13 November 2026. Use Stripe test mode and follow its current expiry and CVC instructions. ToolsRiver is not affiliated with Stripe.