Generate test card numbers from a BIN
The BIN (bank identification number) is the first 6 to 8 digits of a card number. It tells a payment system which network and which bank a card belongs to, and whether it is a debit, credit or prepaid product. When your code makes decisions from the BIN — routing, fraud rules, surcharges, card-type labels — you need test numbers that start with that exact BIN.
- Enter the BIN in the field above (or pick one of the examples below). As soon as you type six digits, the tool shows the network, bank and country the BIN is registered to.
- Set the options: quantity (up to 1,000), a fixed expiry month and year or random ones, a fixed or random CVV, and the output format.
- Generate. Every number starts with your BIN, has the length the network uses and ends with a valid Luhn check digit.
- Copy or download the list as CSV, JSON, XML or pipe-separated text for fixtures, seed data or API mocks.
Example BINs by card network
Real BINs from the largest banks in our BIN data, one per network. Click Use to load a BIN into the generator, or open the BIN page for its details.
| BIN | Network | Type | Issuer | Use this BIN |
|---|---|---|---|---|
| 407975 | Visa | Credit · Classic | Fiserv Solutions, LLC United States | Use |
| 510255 | Mastercard | Debit · Standard | Fiserv Solutions, LLC United States | Use |
| 340321 | American Express | Credit · Personal | American Express US Consumer United States | Use |
| 601101 | Discover | Credit · Personal | Discover Issuer United States | Use |
| 356003 | JCB | Credit · Personal | BC Card South Korea | Use |
| 366000 | Diners Club | Credit · Personal | DC Japan Japan | Use |
| 625336 | UnionPay | Credit · Classic | Agricultural Bank of China China | Use |
| 676195 | Maestro | Debit · Personal | Sberbank of Russia Russia | Use |
| 502951 | RuPay | Debit · Classic | ICICI Bank India | Use |
| 506700 | Elo | Credit · Alimentacao | Banco Bradesco, S.A. Brazil | Use |
| 220024 | Mir | Debit · Premium | VTB Bank (Public Joint-Stock Company) Russia | Use |
| 657366 | Troy | Debit · Personal | Yapi VE Kredi Bankasi, A.S. Turkey | Use |
BINs, patterns and fixed digits
You can type more than a BIN. The field accepts a pattern in which every x is a random digit and
every number is kept as typed:
| You enter | You get |
|---|---|
| 453201 | 16-digit Visa numbers starting with 453201 |
| 45320112 | An 8-digit BIN: numbers starting with 45320112 |
| 5425xxxxxxxx1234 | Mastercard numbers ending in 1234 (handy for masked “•••• 1234” displays) |
| 37xxxxxxxxxxxxx | 15-digit American Express numbers |
The length follows the network detected from the first digits (15 for American Express, 14 for most Diners Club ranges, 16 for most
others); a longer pattern sets the length itself. If the last position is an x, it becomes the Luhn check digit.
What BIN-based test numbers are good for
- Card-type and brand detection — check that your form shows the right logo and asks for a 3- or 4-digit security code.
- BIN rules — debit-only promotions, prepaid restrictions, country rules and surcharges that depend on the BIN.
- Routing tables — make sure each range goes to the right processor or network in your own logic.
- Seed data and demos — realistic-looking but harmless card numbers for staging databases and screenshots.
What they cannot do: pay for anything. A real BIN makes a number look like it came from that bank, but the bank never opened that account, so every real authorization fails. For end-to-end payment tests — approvals, declines, 3-D Secure — use the test cards your payment gateway documents for its sandbox.
6-digit and 8-digit BINs
Since the 2017 revision of ISO/IEC 7812-1, issuer identification numbers are eight digits long, and Visa and Mastercard moved to 8-digit BINs in April 2022. Many banks still hold whole 6-digit ranges, which is why BIN lists — including the BIN list behind this tool — are keyed on six digits. Enter 8 digits to fix the full BIN; the lookup then shows the 6-digit range it falls in.
Generated numbers are test data. They pass format checks only and are declined by every real payment system. Do not use them to sign up for services or to pay for anything.
BIN data: bin-list-data by Venelin Kochev (a lite version of binlookup.io), licensed under CC BY 4.0. Changes made by Fakecreditcard: issuer, brand and country names re-cased and standardized, spelling variants of the same issuer merged, malformed phone numbers and web addresses removed.
Frequently asked questions
What is a BIN generator?
A BIN generator creates test card numbers that start with a BIN you choose — the first 6 to 8 digits that identify the card network and issuing bank. It fills the remaining digits at random and calculates the last digit with the Luhn algorithm, so the numbers have the right format for that BIN but belong to no real account.
Can I generate a card with a specific BIN, expiry date and CVV?
Yes. Enter the BIN, open Expiry, CVV & output format to fix the month, year or CVV (or leave them random), choose how many numbers you need and click Generate. Export as CSV, JSON, XML or pipe-separated text.
Do numbers generated from a real BIN work for payments?
No. A real BIN only makes the number look like it came from that bank. The issuer has never created the account, so any real authorization is declined. Use the numbers for form validation, routing rules and test fixtures; use your gateway's official sandbox cards for end-to-end payment tests.
Where do I find a BIN to test with?
Pick one from the examples on this page, browse the BIN list by country and bank, or look up the first digits of a card you already use for testing in the BIN checker.
What does an x mean in a BIN pattern?
Each x is a random digit. 453201xxxxxxxxxx is the same as the BIN 453201; 5425xxxxxxxx1234 fixes the last four digits too (useful for testing masked displays). The generator still makes the final digit a valid Luhn check digit when it is an x.