Local format checks
Card Prefix Analyser
Explore possible brands and compare six- and eight-digit prefix slices. No bank, country or account lookup.
Try a fixed example, or enter your own synthetic input:
Uses this site's documented test profile. Entered values are not stored or sent by this tool. It does not check payment acceptance, account activity or funds.
Inspect a prefix without inventing issuer data
This analyser answers a local question: which patterns in the site’s test profile are compatible with the digits entered so far? It also shows six- and eight-digit slices when enough input is present. It does not query a bank directory or infer country, funding type or card level from a regex.
Use the example buttons to compare 6, then 60, then 6011. The broad Maestro fallback
must not hide a possible Discover pattern before the fourth digit arrives. Compare that
sequence with 62, where the exact configured UnionPay prefix outranks the broad fallback.
These are results of the stated local profile, not an exhaustive network allocation list.
| Input | Expected interpretation |
|---|---|
6 | Several possible brands; keep typing |
60 | Discover remains possible; do not settle on Maestro |
6011 | Discover candidate in this profile; no checksum on a four-digit prefix |
62 | UnionPay candidate under the configured rules |
9 | Troy remains possible, but its configured 9792 prefix is unfinished |
6011x | Unsupported character; do not silently turn it into 6011 |
Prefix slices and assigned IINs are different things
A six-digit slice is the first six characters; an eight-digit slice adds two more. Neither operation proves who owns that range or how its records are divided. The BIN/IIN explanation covers assignment and data provenance. Visa’s eight-digit BIN guidance provides the network-specific migration context.
The two eight-digit example buttons use 41234567 and 41234568. They share the first six digits but can
represent different mocked routes. A lookup keyed only by 412345 loses that distinction.
The prefix generator lets you construct synthetic inputs for those
branches. The examples do not claim that those prefixes belong to particular banks.
Know which answer requires a data source
| Question | This tool | Your integration’s source |
|---|---|---|
| Which configured patterns still match? | Candidate list | Local test profile |
| Does a full digit string pass Luhn? | Separate arithmetic result | Checksum calculation |
| Which lengths does this site support? | Selected profile’s lengths | Local profile, not a worldwide guarantee |
| What are the issuer, country and funding type? | Not looked up | Provider response or maintained licensed data |
| Can this merchant accept the card? | Not determined | Merchant configuration and provider capabilities |
For funding-response handling, the debit fixture exercise includes unknown and missing data. Treat those states explicitly instead of filling the gaps with a guess based on the first digit. If a lookup service is part of your own application, test timeouts, stale responses and disagreement between sources independently of this analyser.
Reproduce a result with the shared tests
Save and extract the validation example bundle , then run:
node --test card-validation.test.mjs
The analyser and number validator import the same inspection function and use the same JSON profile. The tests reverse the profile order, introduce an equal-specificity conflict and exercise incomplete input. A rule reorder should not silently change the selected brand.
The detection guide shows that implementation. The length guide compares the wider validation profile with the narrower generator output. This separation lets you explain a result without making a claim about a real cardholder’s account.