Credit Card Validator (Brand, BIN & Luhn)

Check a card number for a valid brand prefix, correct length, and Luhn checksum, and see its IIN/BIN and detected network — Visa, Mastercard, Amex, and more. Runs entirely in your browser.

Use a published test number — never enter a real card. Spaces and dashes are ignored.

✓ Passes brand, length, and Luhn checks
Card brand
Visa
IIN / BIN (first 6)
411111
Length
16 (expected 13/16/19)
Luhn checksum
valid ✓

These checks confirm the number is structurally valid — correct brand prefix, length, and Luhn checksum. They do not mean the card exists or has funds. Mapping the BIN to the specific issuing bank or country requires a commercial BIN database and is not done in the browser.

About this tool

Every payment card number carries structure you can verify without any database. The first digits are the IIN/BIN (issuer identification number) that determines the card network — Visa starts with 4, Mastercard with 51–55 or 2221–2720, American Express with 34 or 37, and so on — and the whole number ends with a Luhn check digit that catches the vast majority of typos. This tool detects the brand from the prefix, confirms the length matches what that brand uses, and runs the Luhn checksum, reporting each result independently so you can see exactly which test fails. It is built for developers testing payment flows with published test card numbers. Two honest limits: passing these structural checks does not mean a card is real, active, or funded (only the issuer can confirm that), and resolving a BIN to the specific issuing bank or country requires a commercial BIN database that a browser-only tool cannot include. Never enter a real card number — use the standard test numbers from your payment provider.

How to use it

  • Enter a published test card number (spaces and dashes are ignored).
  • Read the detected brand and the IIN/BIN.
  • Check that length and Luhn both show valid.
  • Use the result to confirm your form's client-side validation logic.

Frequently asked questions

What is the Luhn check?
The Luhn algorithm is a checksum: doubling every second digit from the right (subtracting 9 if over 9) and summing all digits must give a multiple of 10. It catches single-digit errors and most transpositions, which is why card forms use it for instant feedback before contacting the payment processor.
Does a valid result mean the card works?
No. It only means the number is structurally well-formed — right prefix, right length, correct check digit. Whether the card exists, is active, and has funds can only be determined by the issuing bank during an actual authorization.
What is a BIN or IIN?
The BIN (bank identification number), now formally called the IIN (issuer identification number), is the leading 6–8 digits. It identifies the card network and the issuing institution. This tool shows the first six and detects the network, but does not look up the specific bank.
Why can't this tool tell me the issuing bank?
Mapping a BIN to a specific bank and country requires a commercial, regularly-updated BIN database. That data cannot be embedded in a privacy-respecting browser tool, so issuer/country lookup is intentionally out of scope; the brand, length, and Luhn checks are fully accurate on their own.
Which networks are detected?
Visa, Mastercard (including the 2-series range), American Express, Discover, Diners Club, JCB, and UnionPay, using their published IIN prefix ranges and expected lengths.
Is it safe to type a card number here?
Everything runs locally with no network calls, so nothing is transmitted. Even so, never enter a real card number anywhere you don't need to — use the official test numbers (e.g. 4111 1111 1111 1111) provided by Stripe, Adyen, or your processor.

Related tools