Read the card network from a number's BIN prefix — Visa, Mastercard, Amex, Discover, JCB, Diners, UnionPay — plus Luhn check, 100% in your browser
- Runs locally
- Category Developer & DevOps
- Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
Do not paste a real card number. This runs entirely in your browser and nothing is sent or stored — but as a habit, use a published test number.
Enter a number above to read its network.
What this tool does
Paste a card number and this detector tells you which network it belongs to by reading the BIN/IIN prefix — the leading digits that issuers map to a brand. Visa starts with 4, Mastercard sits in 51-55 plus the newer 2221-2720 range, American Express uses 34 or 37, Discover covers 6011, 65 and 644-649, JCB runs 3528-3589, Diners Club uses 36 and 38, and UnionPay begins with 62. Alongside the brand it runs the Luhn (mod 10) checksum so you can see whether the digits form a structurally valid number, and it tells you the length each network normally issues so a mistyped PAN stands out. This is identification by prefix, not a balance or fraud check: a number that matches Visa and passes Luhn is still not proof of a real, issued, funded card. Everything runs in the browser. Nothing is sent, logged, or stored, and the number is never written into the URL — use a published test number, never a real card.
Tool details
- Input
- Numbers
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Developer & DevOps · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How Credit Card Type Detector fits into your work
Use it in the small gaps between coding, reviewing, debugging, and shipping.
Developer jobs
- Formatting, validating, shrinking, or inspecting code-adjacent text.
- Preparing snippets for documentation, tickets, commits, or handoff.
- Checking a small payload quickly without switching tools.
Developer checks
- Run irreversible transforms like minify or obfuscate on a copy.
- Keep secrets out of pasted snippets unless the tool explicitly stays local.
- Use your normal tests or linter before shipping transformed code.
Good next steps
These links move the current task into a more complete workflow.
- 1 Luhn Validator Check any number against the Luhn (mod 10) algorithm, see the doubling math step by step, or compute the missing check digit, all in your browser Open
- 2 Test Credit Card Number Generator Luhn-valid fake card numbers for payment-integration testing — Visa, Mastercard, Amex, Discover, JCB, Diners — non-real, sandbox-only — browser-side Open
- 3 Credit Card Number List Validator Validate and explain issues in credit card numbers from pasted text or uploaded local files. Open
Real-world use cases
Label a card field in a checkout UI as the user types
You are building a payment form and want the little brand badge to flip to Visa or Mastercard the moment enough digits arrive. Paste a few test PANs here to confirm where each brand becomes unambiguous — Amex resolves at two digits (34/37), Mastercard needs the 2-series range check — so you set the right trigger point in your own input handler instead of guessing the prefix rules.
Sanity-check a BIN range before wiring it into routing logic
Your gateway routes transactions by network, and a spec hands you a BIN like 622126. Drop a number with that prefix in and the tool confirms it reads as Discover, not UnionPay, before you hardcode the range. Catching an overlapping range on a test number is far cheaper than catching it on a live decline.
Triage a support ticket that says "my card was rejected"
A user pastes the card type they think they have. Run the leading digits (a published test number, never their real one) and you can tell whether the brand they expect matches the prefix, or whether they fat-fingered a digit and the length no longer fits the network. The Luhn flag separates a typo from a genuinely declined card.
Teach how BIN ranges and the Luhn checksum actually work
Walking a junior engineer or a class through card formats, you want live examples, not slides. Type 4111 1111 1111 1111 and watch it report Visa plus a passing Luhn; change one digit and watch Luhn fail while the brand stays Visa. The split between prefix detection and checksum becomes obvious in a few keystrokes.
Common pitfalls
Treating a brand match plus a passing Luhn as proof the card is real. Both only check format. A made-up number that starts with 4 and happens to pass the mod-10 checksum reads as a valid-looking Visa, yet no account exists behind it. Use this to identify and format-check, never to authorise.
Pasting a real card number into a web tool. Even though this one runs fully client-side and keeps the number out of the URL, the safe habit is to use a published test PAN like 4111 1111 1111 1111. Save the real card for the actual checkout, behind the merchant's PCI-compliant form.
Ignoring the expected-length hint. A number that starts with 34 but has 16 digits is not a normal Amex, which is 15. When the detected brand and the digit count disagree, a digit was probably added or dropped, so fix the input before trusting the result.
Privacy
Detection is plain JavaScript that runs inside your browser tab. The card number you type is held in component memory only: it is never sent over the network, never logged, never stored, and — unlike most tools here — it is deliberately kept out of the URL, so there is no shareable link that could carry it into someone's access log. The copy button copies the identification result (brand, Luhn, length), never the number itself. Still, the right habit on any web form is to use a published test number such as 4111 1111 1111 1111 rather than a card from your wallet.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only