The first 6-8 digits of any payment card are the Bank Identification Number (BIN), also called the Issuer Identification Number (IIN). It is a public prefix that maps to a card network, so this checker can identify the scheme — Visa, Mastercard, American Express, Discover, JCB, Diners Club, UnionPay or Maestro — from just those leading digits, and run a Luhn check if a full number is supplied. You only ever need the BIN, not a full card number.
How it works
Card networks reserve known prefix ranges, so the tool matches the leading digits of the number against those ranges, ordered most-specific first so the first match wins:
| Network | Starts with | Length |
|---|---|---|
| Visa | 4 | 13, 16, 19 |
| Mastercard | 51-55, 2221-2720 | 16 |
| American Express | 34, 37 | 15 |
| Discover | 6011, 65, 644-649, 622 | 16 |
| Diners Club | 36, 38, 300-305 | 14 |
| JCB | 3528-3589 | 16 |
| UnionPay | 62 | 16-19 |
When you enter a full number it also runs the Luhn (mod-10) check to confirm the number is well-formed. The lookup is a local prefix table, so nothing is sent anywhere.
The Luhn algorithm explained
The Luhn check is a simple checksum formula every major card network uses to catch obvious typos in card numbers. Starting from the rightmost digit and moving left, you double every second digit. If doubling produces a number greater than 9, subtract 9. Sum all the resulting digits. A valid card number always produces a sum divisible by 10. For example, the number 4532015112830366 is a valid Visa test number because its Luhn sum is divisible by 10; a single transposed digit would break it.
Worked example
Say you receive a payment form where the customer typed 37828224631000. The first two digits are 37, which matches the American Express prefix, and American Express cards are always 15 digits long. The tool immediately tells you the network and expected length. If the customer entered a full 15-digit number, the Luhn check confirms whether the digits are internally consistent — catching a typo like swapping the 5th and 6th digit — without ever needing to contact a payment processor.
What BINs are used for in practice
Developers and fraud analysts use BIN lookups for several legitimate purposes. Payment forms can show the correct card logo as soon as the first four digits are typed. Fraud filters can flag mismatches between the declared card type and the detected network. Merchants can also check whether a card prefix is expected to be a debit or credit card, which affects processing fees under interchange pricing. None of this requires a full card number — the BIN alone carries the network information.
Privacy and security
This checker runs entirely inside your browser using a local prefix table. No digit you type is sent to any server. As a rule, you should never paste a full card number into any online tool you do not control — the BIN prefix (first 6-8 digits) is all this tool needs, and sharing only those digits cannot put a real account at risk. Private keys, CVV codes, and full PANs should always stay with the cardholder.