This Discover card generator produces Luhn-valid test numbers across the network’s published BIN ranges. Discover is worth a page of its own for one reason: it has the most fragmented prefix structure of any major network, and detection code written for it is wrong more often than for any other brand.
Test card only
Credit Card Number Generator
Generate dummy card details for development and QA. Nothing is stored or sent to a server.
Discover card number format
| Property | Value |
|---|---|
| BIN ranges | 6011, 622126–622925, 644–649, 65 |
| Standard length | 16 digits |
| Extended length | 19 digits |
| Check digit | Luhn (mod 10) |
| Security code | CID, 3 digits, on the back |
| Grouping | 4-4-4-4 |
Why Discover’s BIN ranges are the messiest
Every other major network can be described in a sentence. Visa is 4. Mastercard is 51–55
plus 2221–2720. American Express is 34 and 37. Discover takes four blocks that have no
relationship to each other, and each arrived for a different reason.
6011 is the original. It is the range most developers know, and the one most detection code
checks — which is exactly the problem, because it is now a minority of the cards in
circulation.
622126–622925 is a co-brand block shared with China UnionPay. Cards issued in it can route
over either network depending on where the transaction happens. This is a real commercial
arrangement rather than a numbering coincidence, and it has a precise consequence for code: a
loose ^62 test will claim UnionPay cards outside the block, and a loose ^622 test will
claim ones just outside its boundaries. The block starts at 622126 and ends at 622925, and
both edges matter.
644–649 and 65 were added later as the network grew. 65 in particular is the range that
collides with Maestro, whose own block spans 56–69 — so a naive
detector that checks Maestro first will classify a large share of Discover cards as Maestro.
Order of evaluation is not a style preference here; it changes the answer.
On top of the ranges, Discover Global Network operates reciprocal acceptance with Diners Club, JCB and UnionPay. A Diners card presented in the United States is frequently processed over Discover rails. That does not change the digits, but it does mean “which network is this” and “which network will process it” are two different questions with two different answers.
Where Discover is accepted
Domestic acceptance in the United States is near universal — Discover sits alongside Visa and Mastercard at essentially every merchant. Internationally the picture is different and worth understanding, because it drives whether you need to support the brand at all.
Outside the US, Discover cards clear through partner networks rather than a Discover-branded acceptance footprint. Discover Global Network reaches most of the world through Diners Club International, together covering more than 185 countries and territories, plus alliances with UnionPay, JCB and various domestic schemes. For a merchant, the practical question is not “does Discover work in this country” but “does my acquirer route Discover, and at what cost”.
If your customer base is meaningfully American, supporting Discover is not optional. If it is entirely European, it is a low priority — but the detection code should still be correct, because a wrongly detected card fails in a way that looks like a bug in your form.
Brand is not the same as routing network
The partnerships make a distinction that most codebases collapse, and it is worth separating deliberately because it shows up in reconciliation rather than in checkout.
The brand is what the card says it is — what the cardholder sees, what logo you should display, what the digits encode. The routing network is which set of rails actually carried the authorisation, which depends on the merchant’s acquirer, the country, and the partner agreements in force.
For a Discover-branded card in the United States these are the same. For a Diners card in the United States, or a JCB card, or a UnionPay card in the co-brand block, they are not. Your checkout should key on brand: that is what determines the logo, the security-code rules and the input mask. Your finance reporting should key on the routing network, because that is what determines the interchange you actually paid.
Code that uses one field for both produces reports that do not reconcile against the processor’s, and the discrepancy is small enough to be dismissed as rounding for a long time before someone traces it.
Brand detection regex
Discover is the one network where a short expression is guaranteed to be wrong:
const DISCOVER = /^(6011\d{12}|65\d{14}|64[4-9]\d{13}|622(12[6-9]|1[3-9]\d|[2-8]\d\d|9[01]\d|92[0-5])\d{10})$/;
The 622 alternation is doing the work — it encodes the range 622126 to 622925 digit by
digit, because a numeric comparison is not available inside a regular expression. Test it at
the edges rather than in the middle:
DISCOVER.test('6221250000000000'); // false — one below the block
DISCOVER.test('6221260000000000'); // true — first number in the block
DISCOVER.test('6229250000000000'); // true — last number in the block
DISCOVER.test('6229260000000000'); // false — one above the block
DISCOVER.test('6440000000000000'); // true — 644-649 range
DISCOVER.test('6430000000000000'); // false — just outside it
If you would rather express the ranges as numbers than as an alternation, parse the first six digits and compare — it is easier to read and far easier to get right. The regex is useful when you need a single-expression check, not because it is clearer.
Testing scenarios
- All four ranges. Generate a card in each of
6011,622126–622925,644–649and65and confirm your detector reports Discover for every one. - Boundary values. The four numbers above are the tests that catch off-by-one errors in the co-brand block. They belong in your suite permanently.
- Detection order. Feed a
65number to your full detection chain, not just the Discover expression, and confirm Maestro does not claim it first. - 19-digit acceptance. Generate a nineteen-digit number and confirm the form accepts it.
- CID length. Three digits, not four. A shared field that keys length to the name “CID” rather than the brand will demand four and reject valid input.
Official test numbers
For sandbox testing where you need a processor to respond, use the gateway’s own numbers
rather than generated ones. Stripe publishes 6011 1111 1111 1117 and
6011 0009 9013 9424 for Discover, Square uses 6011 0000 0000 0004, and Adyen documents
6011 6011 6011 6611. The test card numbers reference collects them by
gateway with their decline codes.
Discover’s own developer material lives at Discover Global Network, which is also the authoritative source for acceptance and partner-network arrangements.
Related tools and guides
If you are unsure which of the four ranges a number falls in, the validator reports the detected network and shows the prefix broken out from the rest of the digits. The IIN and BIN explainer covers why allocations fragment like this in the first place, and the brand detection guide carries the full expression set. All nine network generators are listed in the tool directory, and the FAQ explains the limits of a Luhn check.