EMV Decoder Logo

PAN Validator

Validate Primary Account Numbers (PANs) and identify card types based on BIN ranges.

PAN Validator
Check if a card number is valid and identify its type.

Spaces and separators are allowed (e.g., 4111-1111-1111-1111)

About PAN Validation

PAN (Primary Account Number) validation is a fundamental process in payment card processing. It involves two main aspects: structural validation and card type identification.

Luhn Algorithm Validation

The Luhn algorithm (also known as the "modulus 10" algorithm) is used to validate card numbers. It detects accidental errors such as single digit mistakes or transpositions.

The algorithm works as follows:

  1. Starting from the rightmost digit, double the value of every second digit.
  2. If doubling results in a two-digit number, add those digits together.
  3. Sum all the digits in the resulting sequence.
  4. If the total is a multiple of 10, the number is valid.

Card Type Identification

Card types are identified by their BIN (Bank Identification Number), which is typically the first 6-8 digits of the PAN. Common BIN ranges include:

  • Visa: Starts with 4, length of 16 digits (some older cards may have 13 digits)
  • Mastercard: Starts with 51-55 or 2221-2720, length of 16 digits
  • American Express: Starts with 34 or 37, length of 15 digits
  • Discover: Starts with 6011, 644-649, or 65, length of 16 digits
  • JCB: Starts with 3528-3589, length of 16-19 digits
  • Diners Club: Starts with 300-305, 36, or 38, length of 14-19 digits
  • UnionPay: Starts with 62, length of 16-19 digits
  • Maestro: Starts with 5018, 5020, 5038, 5893, 6304, 6759, 6761, 6762, 6763, length of 16-19 digits

Important Notes

  • Passing the Luhn check does not guarantee that a card number is valid or active, only that it is well-formed.
  • BIN ranges can change over time as card networks evolve their numbering systems.
  • Some card types share BIN ranges, making precise identification challenging without additional information.
  • For security reasons, PAN validation should be performed client-side before transmission to minimize exposure of card data.

EMV Decoder tools perform all calculations client-side for maximum security. No sensitive data is ever transmitted to our servers.