How to use Random String Generator
- Set the length (1 to 512) and how many strings you want (1 to 1,000).
- Tick the character types to include, add any extra characters of your own, and optionally exclude look-alike characters.
- Click Generate for a new batch, or change an option to regenerate.
- Copy the strings or download them as a text file.
Features
- Lowercase, uppercase, numbers and symbols, plus your own characters
- Option to exclude look-alike characters (I, l, 1, O, 0, o)
- Up to 1,000 strings of up to 512 characters
- Shows the randomness in bits for each string
- Uses the Web Crypto generator with unbiased selection
- Nothing is sent or stored
Examples
| Input | Result |
|---|---|
| Length 8, numbers only | A random string such as 40917258 (different every time) |
| Length 12, letters and numbers | A random string such as aZ3kq9Lm2Xwp (different every time) |
Limitations
- Results are random, so they change every time and cannot be reproduced.
- Uniqueness across a batch is not enforced; with very short strings, two strings in one batch can match.
- For account passwords, use the password generator and a password manager.
Learn more
A random string is a sequence of characters chosen independently and uniformly from an alphabet. Such strings are used for test data, temporary file names, invitation codes, API tokens and identifiers.
Two things decide how good a random string is: the source of randomness and the amount of it. Ordinary random functions in programming languages are fast but predictable if you know the internal state; for anything that must be hard to guess, the operating system’s cryptographically secure generator should be used. Browsers expose it through Web Crypto, which is what this tool uses. It also avoids a subtle bias: picking a character with a simple modulo can favour some characters, so the tool discards values that would cause that.
The amount of randomness, measured in bits, is the length times the base-2 logarithm of the alphabet size. More characters in the alphabet and more length both help, but length usually helps more.
Frequently asked questions
Is this random enough for security tokens?
It uses the browser’s cryptographically secure random generator, which is suitable for tokens and IDs. Make the string long enough: the tool shows the bits of randomness for your settings.
How many bits of randomness does a string have?
Length × log2(size of the character set). For example, 16 characters from 62 letters and digits give about 95 bits.
What are look-alike characters?
Characters that are easy to mix up when read by eye, such as I, l, 1, O, 0 and o. You can exclude them for strings people will type by hand.
Are the strings stored or sent anywhere?
No. They are generated and shown only in your browser.
Last reviewed: September 30, 2026