Credit Card Validator

Validate any credit card number using the Luhn algorithm. Instantly check card type, MII category, and issuer information.

What is Luhn Validation?

The Luhn algorithm (also known as the "modulus 10" algorithm) is a simple checksum formula used to validate credit card numbers. It detects accidental errors in card numbers, such as typos or single-digit mistakes. All legitimate credit card numbers pass this validation.

What is MII?

The Major Industry Identifier (MII) is the first digit of a credit card number. It identifies the industry category of the card issuer. For example, 4 and 5 are used by banking and financial institutions, while 3 is used by travel and entertainment companies.

What is IIN/BIN?

The Issuer Identification Number (IIN), also known as Bank Identification Number (BIN), consists of the first 6-8 digits of a card number. It identifies the institution that issued the card. Use our BIN Checker for detailed issuer information.

What is PAN?

The Primary Account Number (PAN) is the individual account identifier portion of a credit card number. It's located after the IIN/BIN and before the check digit. The PAN identifies the specific cardholder's account.

Card number formats by network

A number is only valid if it passes the Luhn checkand matches a network's prefix and length. This is what the validator checks against.

NetworkStarts withLengthSecurity code
Visa413, 16 or 19 (almost always 16)3 digits (CVV2)
Mastercard51–55, 2221–2720163 digits (CVC2)
American Express34, 37154 digits (CID)
Discover6011, 644–649, 6516–193 digits (CID)
Diners Club36, 300–305, 38–3914–193 digits
JCB3528–358916–193 digits (CAV2)
UnionPay6216–193 digits (CVN2)
Maestro5018, 5020, 5038, 6304, 6759, 6761–676312–193 digits
RuPay60, 65, 81, 82, 508163 digits
Mir2200–220416–193 digits

Credit card validator FAQ

How do I check if a credit card number is valid?

Paste the number into the validator. It runs the Luhn checksum, then checks that the prefix and length match a card network. A number that passes both is correctly formed.

Does a valid result mean the card is real?

No. Validation only confirms the number is well-formed. Whether a card exists, is active or has funds can only be confirmed by an authorisation through a payment processor.

Why does a number fail validation?

Usually a typo: the Luhn checksum catches any single wrong digit and most swaps of two adjacent digits. A number can also fail if its length does not match the network its prefix belongs to.

Is it safe to paste a card number here?

Validation runs entirely in your browser and nothing is sent to our servers. Even so, use test numbers rather than real cards when you are testing.