Random Alphanumeric Generator
RG-26Choose a length and a character set, press Generate strings, and copy random codes made of letters and digits. They are made on your computer and never saved.
Runs in your browser. Nothing is uploaded.
Not used. Choose the options and press Generate.
Random strings
How to use it
- Pick the length, from 4 to 128 characters.
- Choose how many strings you want and which characters to use.
- Optionally leave out look-alike characters or require at least one letter and one digit.
- Press Generate strings and copy the list.
Character sets and fairness
The sets are A-Z with a-z and 0-9 (62 characters), lowercase with digits, uppercase with digits, letters only, digits only and hex (0-9 and a-f). Each character is chosen on its own from the set, using crypto.getRandomValues and rejection sampling, so every character has the same chance. A string of 12 characters from the 62-character set has about 71 bits of choice. The tool does not guarantee that strings are unique across a list, though repeats are very unlikely at longer lengths.
Look-alikes and mixed requirements
Leave out look-alikes removes 0, O, o, 1, l and I, which helps when people read or type the code. That makes the mixed set 56 characters, so a string of the same length is slightly weaker. At least one letter and one digit throws away and redraws any string that lacks either, which keeps the rest equally likely. It does nothing with the letters-only and digits-only sets. These strings are not stored, so copy what you need.
Questions people ask
What is an alphanumeric string?
It is a string made only of letters and digits, such as 7fK2mQ9x. No spaces or symbols are used. People use them for codes, test IDs, short tokens and file names.
How do I generate a random string of letters and numbers?
Choose the length, keep the A-Z, a-z, 0-9 set, and press Generate strings. Use the How many choice for a list. Each string is made on your computer and is not stored.
Can I make a random code without confusing characters?
Yes. Tick Leave out look-alikes. The characters 0, O, o, 1, l and I are removed, so a code is easier to read aloud or type. The mixed set then has 56 characters.
Is it safe to use for passwords or API keys?
The characters come from a secure random source, so they are unpredictable. For a password you also want symbols and a length of 16 or more, which the password generator on this site covers. Never paste a live production secret into any web page.
How do I make sure a string has a letter and a digit?
Tick At least one letter and one digit. Strings that lack either are discarded and redrawn. With the length at 4 or more, this is quick. It does not apply to letters-only or digits-only.
Can I get hex strings?
Yes. Choose Hex (0-9, a-f) under Characters. Lowercase hex digits are used, so a length of 32 gives 128 bits, the size of a UUID without hyphens, though this is not a UUID.
About this tool
Values are made in your browser with crypto.getRandomValues and rejection sampling, so no value is favored, and nothing is sent anywhere or stored. Each character is picked independently and uniformly from the set you choose. The "at least one letter and one digit" option throws away and redraws any string that lacks either, which keeps every remaining string equally likely. It has no effect on the letters-only or digits-only sets. Removing look-alikes shrinks the set a little (the mixed set goes from 62 to 56 characters), which lowers the strength of a string of the same length. These strings are not a password manager entry: they are not stored, so copy what you need, and use the password generator when you need a password with symbols.