UtilityToolsLab

© 2026 UtilityToolsLab. Built and maintained by the UtilityToolsLab Team.

Free eBooks·About·Changelog·Privacy Policy·Terms of Service·Report a bug
HomeAuth, Privacy & ValidationCard Validator

Related Tools

Suspicious URL Check2FA QR BuilderTOTP GeneratorEmail Validator

Credit Card Number Validator (Luhn)

Validate any card number with the Luhn algorithm. Detects Visa, Mastercard, Amex, Discover and more. Shows IIN, CVC length, and formatted display.

You Might Also Like

All Auth, Privacy & Validation

Suspicious URL Check

Read a link before you click it: decodes punycode, spots the @ trick, mixed-script homographs and brand-in-subdomain. The link is read, never fetched.

2FA QR Builder

Build the otpauth:// URI for a TOTP or HOTP account and render it as a scannable QR code. SHA-1/256/512, 6–8 digits, 30–90s period. Nothing uploaded.

TOTP Generator

Generate time-based one-time passcodes from a Base32 secret using RFC 6238, entirely in your browser. Configure the algorithm, digit count, and refresh period.

Email Validator

Check one address or a whole list for syntax errors, mistyped providers, disposable domains and role accounts. Nothing is uploaded or looked up.

Paste any card number and this tool runs the Luhn algorithm against it instantly, identifies the card network from the prefix, and breaks down every piece of information the number encodes: the IIN, the digit count, the CVC length, and a formatted display with redaction.

Load Sample inserts a well-known test number (the Visa test card 4532015112830366 on the first press, then Mastercard, Amex, Discover, and JCB in sequence). Pressing it a second time cycles to the next network so you can see the detection logic switch. Spaces and dashes in pasted numbers are stripped automatically before validation.

How It Calculates the Luhn Checksum

  1. Start from the rightmost digit (the check digit). Move left, doubling every second digit.
  2. If doubling a digit produces a number greater than 9, subtract 9 from it.
  3. Sum all digits including the undoubled ones. If the total is divisible by 10, the checksum passes.
  4. A passing Luhn check means the number is self-consistent — it does not mean the card exists or has funds. Luhn only catches accidental transpositions and typos.

Network Detection and What Each Field Means

  • Network: identified from the IIN prefix. Visa starts with 4; Mastercard with 51–55 or 2221–2720; Amex with 34 or 37; Discover with 6011 or 65; JCB with 3528–3589; Diners Club with 300–305, 36, or 38; UnionPay with 62; Maestro with 5018, 5020, 5038, 6304, 6759, or 6761–6763. An unrecognised prefix is shown as "Unknown."
  • IIN / BIN (Issuer Identification Number): the first 6 digits. Identifies the bank or institution that issued the card. This is not sensitive — it is the same prefix on every card from that issuer.
  • CVC length: Amex uses a 4-digit CVC printed on the front of the card. All other major networks use a 3-digit CVC on the back.
  • Redacted format: all digits except the last four are replaced with asterisks — the format used in receipts and UI displays to show "card ending in 0366" without exposing the full number.

Accuracy Limits

  • Luhn validation catches single-digit errors and most transpositions, but it does not catch all two-digit swaps, and it cannot detect a number that was never issued. Roughly 1 in 10 random digit strings will pass Luhn by chance.
  • Network detection is prefix-based and covers the 8 major networks above. Sub-networks, co-branded cards, or newer IIN ranges not listed may show as "Unknown" even if the Luhn check passes.
  • This tool accepts 8 to 24 digit inputs. Numbers shorter than 8 digits return "invalid checksum" regardless of the digit values, because no real network issues cards that short.

Spaces and dashes are stripped automatically. Only test or fictional numbers — never enter a real card.

Paste or type a card number above. Load Sample inserts a known test number so you can see all fields populate.

All validation runs locally in your browser. No number is transmitted anywhere. Use only test numbers (e.g. from Stripe's or Braintree's docs) or fictional numbers — never enter a real cardholder's data.