Random Alphanumeric Generator

Share randomizer:
Embed this tool:

Build random strings of letters and digits in one click. Set the length and how many you need, edit the character set, and decide whether characters or whole strings may repeat.

What is an alphanumeric string?

An alphanumeric string is a run of characters taken from letters and digits. The default character set here holds the 26 lowercase letters and the ten digits 0 to 9, so every position in a string has 36 possible values. Type capital letters into the box as well and the count rises to 62.

Short mixed strings suit labels that must be compact and unlikely to collide: order references, invitation codes, coupon codes and placeholder test data.

How to generate random alphanumeric strings

  1. Edit Characters to use if you want something other than a to z and 0 to 9.
  2. Enter the String length (1 to 1,000) and the Number of strings (1 to 10,000).
  3. Tick Output in uppercase, Unique characters in string or Unique strings only if needed; both unique options are explained below.
  4. Press the button. The strings appear one per line, and the copy button takes the whole list.

Using your own character set

Separate characters with commas, spaces, tabs or line breaks. Whatever sits between two separators counts as a single character, so a token such as ab is allowed and adds both letters whenever it is drawn. A length of 4 means four draws from the list. A semicolon or any other symbol is not a separator and simply becomes part of the token.

  • Hexadecimal digits: 0 1 2 3 4 5 6 7 8 9 a b c d e f
  • Codes that are easy to read aloud: leave out look-alikes such as 0, o, 1, l and i.
  • Weighted draws: repeat a token to make it more likely. With a a a b, every draw has a 75% chance of giving a and 25% of giving b.

The set needs at least two entries; one entry could only repeat itself.

How many different strings are possible?

If the set holds k characters and each string is L characters long, characters can repeat and the number of distinct strings is:

strings = kLRepeats allowed

strings = k × (k − 1) × … × (k − L + 1)With "Unique characters in string" ticked

Distinct strings when characters may repeat
Length36 symbols (a-z, 0-9)62 symbols (a-z, A-Z, 0-9)
41,679,61614,776,336
62,176,782,33656,800,235,584
82,821,109,907,456218,340,105,584,896

Example: you want 1,000 six-character codes from the 36-symbol set. There are 366 = 2,176,782,336 possible codes and 1,000 × 999 ÷ 2 = 499,500 pairs of codes that could clash, so the expected number of clashes is about 499,500 ÷ 2,176,782,336 ≈ 0.00023. Raise the batch to 10,000 codes and it becomes about 0.023, roughly a 2.3% chance of at least one repeat. To rule out any repeat, tick Unique strings only.

Unique characters versus unique strings

Unique characters in string works like drawing tiles from a bag without putting them back: no character shows up twice inside the same string. It needs enough different characters to fill the length; a 10-character string cannot come from 8 distinct characters, and the tool will say so. Five unique characters from the 36-symbol set give 36 × 35 × 34 × 33 × 32 = 45,239,040 strings.

Unique strings only is about the whole list: no two strings are identical. It is the option to use for raffle tickets or voucher codes. If you ask for more strings than can exist, for example five strings of two characters from just a and b (only four exist), the generator reports an error rather than looping forever.

Uses and cautions

  • Reference numbers and short IDs for orders, tickets or support cases.
  • Sample data for databases, forms and demos.
  • Invitation, coupon and giveaway codes, with unique strings switched on.

Everything is produced in your browser, using the system's secure random source when the browser offers one. For an account password, though, use the password generator, which is built around password rules. Related generators: the random string generator and the random letter generator.

Frequently asked questions

Are the strings really random?

Each character is drawn independently and with equal probability from your list, using the browser's cryptographic random generator when it is available. No pattern carries over from one string to the next.

How do I get both uppercase and lowercase letters?

Type the capitals into the character box next to the lowercase letters. The uppercase option only converts the output to capitals; it does not mix cases.

Why does it say at least 2 items are needed?

A character set with a single entry could only produce one possible string. Add at least one more character or token.

What is the longest string I can make?

Each string can be up to 1,000 characters and a single run can produce up to 10,000 strings. For more, run the generator again and combine the output.

Cite this randomizer and page

If you use this page in your work, you can cite it as:

Reeliy Editorial Team. (2026). Random Alphanumeric Generator. Reeliy. https://reeliy.com/randomizers/random-alphanumeric-generator“Random Alphanumeric Generator.” Reeliy, 2026, https://reeliy.com/randomizers/random-alphanumeric-generator.