Advertisement

8 card networks · 374,788 BINs · 90 IBAN countries

BIN Generator

Enter a BIN (the first 6–8 digits) to generate Luhn-valid test card numbers that start with it, with expiry date and CVV. The BIN is looked up as you type, so you can see which bank and country it belongs to.

Advertisement
Generated cards

Test data only — these numbers are not issued by any bank and every real payment with them will be declined.

Advertisement

Generated locally with your browser’s crypto API — nothing is sent to a server.

Visa format

Starts with
4
Length
13, 16, 19
Security code
3
Stripe
4242 4242 4242 4242
Visa generator
Advertisement

Brand ranges at a glance

The prefixes and lengths your checkout must accept. Each brand has its own generator page.

For developers & QA

Test data that stays out of PCI scope

Use generated numbers for everything before the payment request, then switch to your gateway’s official sandbox cards for approvals, declines and 3-D Secure.

  • Test form validation & input masks
  • Seed staging databases and demos
  • Reproduce declines and 3-D Secure in the sandbox
Browse gateway test cards

Official sandbox cards, per gateway

All 18 gateways →

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.

  1. 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.
  2. 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.
  3. Generate. Every number starts with your BIN, has the length the network uses and ends with a valid Luhn check digit.
  4. 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.

BINNetworkTypeIssuerUse this BIN
407975VisaCredit · Classic Fiserv Solutions, LLC United States Use
510255MastercardDebit · Standard Fiserv Solutions, LLC United States Use
340321American ExpressCredit · Personal American Express US Consumer United States Use
601101DiscoverCredit · Personal Discover Issuer United States Use
356003JCBCredit · Personal BC Card South Korea Use
366000Diners ClubCredit · Personal DC Japan Japan Use
625336UnionPayCredit · Classic Agricultural Bank of China China Use
676195MaestroDebit · Personal Sberbank of Russia Russia Use
502951RuPayDebit · Classic ICICI Bank India Use
506700EloCredit · Alimentacao Banco Bradesco, S.A. Brazil Use
220024MirDebit · Premium VTB Bank (Public Joint-Stock Company) Russia Use
657366TroyDebit · Personal Yapi VE Kredi Bankasi, A.S. Turkey Use
Advertisement

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 enterYou get
45320116-digit Visa numbers starting with 453201
45320112An 8-digit BIN: numbers starting with 45320112
5425xxxxxxxx1234Mastercard numbers ending in 1234 (handy for masked “•••• 1234” displays)
37xxxxxxxxxxxxx15-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

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.

Related tools

Advertisement