Generate a batch of unique, cryptographically-random codes for promos, vouchers, gift cards, invite links, licence keys, or beta signups. Everything runs in your browser — no server round-trip, no code ever leaves the page. Pick an alphabet (defaults to a no-confusables set that skips 0/O, 1/I/L and the like so hand-typed codes don't collide), a chunk layout like XXXX-XXXX-XXXX, and optionally sign each code with a check digit for typo-detection at redemption time.
Paste one code below — the tool checks it against the current alphabet, pattern, and check-digit rule.
Every random alphabet character contributes log₂(alphabet size) bits of entropy. A 12-char code from the default 32-symbol no-confusables alphabet gives 5 × 12 = 60 bits, which by the birthday bound means a 50 % chance of collision after roughly √(2 · 2⁶⁰) ≈ 1.5 × 10⁹ codes — plenty for even a huge promo campaign. If you're worried, generate more codes than you need and reject duplicates (this tool does that when unique is checked). For anti-abuse guessing resistance (an attacker submitting random codes to your redemption API), aim for ≥ 50 bits; at that point they'd need ~10¹⁵ tries to expect one hit — impractical if your endpoint rate-limits at even a modest 10 rps.
Mod-N over alphabet — treat each alphabet character as its index (A→0, B→1, …), sum indices, take sum mod N, output that alphabet character as the last position. Any single-char typo, any single-digit change, and most transpositions are caught. Simple to implement in any language.
Luhn — the classic credit-card algorithm (mod-10 doubled-alternate). Only works when the alphabet is digits 0-9. It catches every single-digit error and most adjacent transpositions.
Neither — plain random. Redeemer has to look up the exact string; no client-side typo hint. Use this when you want the code to look clean and the redemption endpoint already de-dupes at the DB layer.
| Preset | Symbols | Size | Bits/char |
|---|---|---|---|
| No-confusables | ABCDEFGHJKMNPQRSTVWXYZ23456789 | 30 | ~4.91 |
| Crockford Base32 | 0123456789ABCDEFGHJKMNPQRSTVWXYZ | 32 | 5.00 |
| Uppercase A-Z | A…Z | 26 | ~4.70 |
| Uppercase + digits | A…Z 0-9 | 36 | ~5.17 |
| Alphanumeric | A…Z a…z 0-9 | 62 | ~5.95 |
| Digits | 0-9 | 10 | ~3.32 |
| Hex | 0-9 A-F | 16 | 4.00 |
| URL-safe base64 | A…Z a…z 0-9 - _ | 64 | 6.00 |