Credit Card Generator
Fictitious numbers for testing. They do not work for real purchases.
- Pick a brand or leave it random.
- Set the quantity and whether to include a security code and expiry date.
- Generate and copy the result.
The leading digits identify the brand and are not free: Visa starts with 4, Mastercard uses 51 to 55 and also 2221 to 2720, American Express uses 34 and 37.
Length varies too. Most use 16 digits, but Amex uses 15 — and a 4-digit security code instead of 3.
The middle digits are drawn at random, and the last one is computed with the Luhn algorithm so the number passes consistency checks.
Regional brands use their own ranges that partly overlap the international ones, which is why a number starting with certain four-digit prefixes may belong to a local brand rather than Visa.
The number passes format and Luhn validation, which is the check performed in the browser before a transaction is sent. That lets you test input masks, field validation and brand detection in your form.
But it does **not** work in any real transaction. There is no account, issuer, holder or credit limit behind it — authorisation is declined as soon as the network is queried.
To test actual payments, use your processor’s test cards. They all publish specific numbers that simulate approval, decline and error, and only work in sandbox environments.
Attempting to use any card number that is not yours to obtain goods or services is fraud, even if the number was generated and belongs to nobody.
This tool exists for software development and testing, and the generated number is useless outside that — which is intentional.
Generation happens entirely in your browser: no number is transmitted or logged.
Frequently asked questions
No. It only passes the format and Luhn validation done in the browser. There is no issuer or account behind it, so authorisation is declined as soon as the network is queried.
Use your payment processor’s test cards. They publish specific numbers that simulate approval, decline and error in a sandbox environment.
American Express uses 15 digits and a 4-digit security code, while most brands use 16 and 3. Both formats are legitimate.
The middle digits are drawn at random, so coincidence is theoretically possible. It is still unusable: without the physical card and the holder’s details, no transaction is authorised.
No. Everything is generated in your browser and nothing is logged.