Random Alphanumeric Generator

Generate random codes made of letters and numbers.

0 codes

Random Alphanumeric String Generator

Create random alphanumeric strings – combinations of letters and numbers only. They are the most practical kind of random code: easy to type, safe in URLs and file names, and accepted by almost every system without escaping. Generate voucher codes, reference numbers, short IDs, invite codes or test keys in bulk.

Options

  • Length – the exact number of characters per code.
  • Letter case – mixed (62 possible characters), uppercase or lowercase (36 characters).
  • Exclude look-alikes – drops I, l, 1, L, o, 0 and O so people do not confuse them when reading printed or spoken codes.
  • Start with a letter – for identifiers that cannot start with a digit.
  • Unique – no duplicates in the batch, on by default.

Presets

Coupon codes creates 8-character uppercase codes without ambiguous characters, ideal for printing on cards and receipts. IDs creates 16-character lowercase identifiers beginning with a letter, ready for HTML ids, CSS classes or slug-like keys.

Alphanumeric vs. other random strings

Symbols increase entropy, but they break URLs, need quoting in shells and confuse people on the phone. Alphanumeric codes trade a little entropy per character for much better usability; simply add a couple of characters to compensate. A 10-character mixed-case code already has about 59 bits of entropy.

Secure and private

Each character is drawn from the browser's cryptographically secure random generator. Codes are created locally and are not sent anywhere, so you can safely generate production vouchers here.

For custom character sets and variable lengths, use the Random String Generator; for letters only, try the Random Letter Generator.

Frequently Asked Questions

Only the letters A–Z (in the case you choose) and the digits 0–9. There are no spaces, punctuation or symbols, so the strings are safe in URLs, file names, HTML IDs and most database fields without escaping.

Many identifiers – variable names, HTML id attributes in older standards, CSS class names, some database keys – must not begin with a digit. This option replaces the first character with a random letter.

Mixed case gives 62 characters, one case gives 36. An 8-character uppercase code has 36^8 ≈ 2.8 trillion combinations; excluding look-alikes reduces that slightly but makes codes easier to type.