The UpTools credit card generator creates fictitious card details (number, expiry date and security code, or CVV) for testing online stores, forms and payment integrations without using real data. You can choose from 28 card brands, and the generated number follows each brand’s prefix, length and check digit.
The cards are not linked to any account, bank or cardholder and cannot be used for purchases. They are meant for testing and learning only.
How to use the generator
- Click the card brand you want. When the page opens, a Mastercard card is generated automatically.
- Check the card preview, with the number, expiry date and CVV.
- Copy each detail separately with the button next to it.
- For another card of the same brand, click Generate again.
Available card brands
- International: Visa, Mastercard, American Express, Discover, Diners Club, JCB, UnionPay and Maestro.
- Brazilian: Elo and Hipercard.
- Other national and regional networks: RuPay, Mir, Troy, Verve, Cabal, Interac, BC Card, Dankort, Meeza, PayPak, DinaCard, NAPAS, MEPS, ComproCard, Carte Bancaire, Elcart, Arca and ICA.
How a card number is structured
Prefix (IIN/BIN) and length
The first digits of a card form the IIN (Issuer Identification Number), also called the BIN (Bank Identification Number). On real cards, they identify the card brand and the issuing bank, and that is how forms recognize the brand as you type. Some examples of prefixes used by the generator:
| Brand | Prefixes | Digits |
|---|---|---|
| Visa | 4 | 16 |
| Mastercard | 51 to 55 | 16 |
| American Express | 34 and 37 | 15 |
| Elo | 636368, 438935, 504175 and 451416 | 16 |
| Hipercard | 606282 and 3841 | 16 |
| Diners Club | 300, 305, 36 and 38 | 14 |
| Verve | 506099 and 507865 | 19 |
All other brands in the generator use 16 digits.
The Luhn algorithm
The last digit of the number is a check digit calculated with the Luhn algorithm, which catches most typing errors. To check a number:
- Moving from right to left and starting with the second-to-last digit, double every other digit.
- If any result is greater than 9, subtract 9 (for example, 8 × 2 = 16, which becomes 7).
- Add up all the digits, doubled and not doubled.
- If the total is a multiple of 10, the number is valid.
Example: in the well-known test number 4111 1111 1111 1111, the doubled digits add up to 8 + 7 × 2 = 22, and the others add up to 8. The total is 30, a multiple of 10, so the number passes the check.
Expiry date and CVV
The expiry date is randomly set 1 to 5 years ahead, in MM/YYYY format. The CVV has 4 digits on American Express and 3 on all other brands. In both cases, the values are random: on a real card, the CVV is calculated by the issuer using secret keys, so there is no public formula to work it out.
Why these cards do not work for purchases
Passing the Luhn check only means the number is well formed. To approve a purchase, the issuer must recognize the number as an existing account, check the expiry date and CVV, verify the credit limit and often authenticate the cardholder. The generated cards have no account, cardholder or limit, so any payment gateway in production will decline them.
Tips for testing payments
- Use the generated numbers to test form validation: input mask, brand detection from the prefix, length, Luhn check and the expiry date and CVV fields.
- In a payment gateway’s sandbox, use the test cards published in its documentation. Many sandboxes accept only those numbers and use specific values to simulate approvals, declines or errors.
- Test brands with different lengths, such as American Express (15 digits and a 4-digit CVV), Diners Club (14) and Verve (19), to make sure your form does not always expect 16 digits.
- Never use real cards in test environments, and never write full card numbers to logs.
To complete the buyer’s details, use the CPF generator (Brazilian individual taxpayer numbers) or, for business purchases, the CNPJ generator (Brazilian company numbers).
Legal notice
The generated data is fictitious and meant only for testing and educational purposes. It is not linked to real accounts or cardholders and has no monetary value. Trying to use it for purchases or subscriptions, or to deceive businesses, is fraud and may be a crime.
Frequently asked questions
Do the generated cards work for purchases?
No. They have no account or credit limit, and the issuer declines the transaction. The generator is meant only for software testing.
Can I use a generated card to unlock a free trial?
No. Services verify the card with the issuer before activating the subscription, and trying to get around that check with fake details is fraud.
What is the difference between CVV and CVC?
In practice, none: they are different names for the security code. Visa uses CVV, Mastercard uses CVC and American Express calls the code CID.
Why is the expiry date always in the future?
Because forms reject expired cards. If you want to test the expired-card message, change the date manually to a month that has already passed.