Random string generator
Make random strings for test data, tokens, codes and identifiers. Choose uppercase, lowercase, digits and symbols, or type your own alphabet, and create up to 100 strings of up to 256 characters at once. Everything runs in your browser.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Set the length of each string and how many strings you want.
- Tick the character sets, or type your own alphabet in the custom box.
- Optionally leave out look-alike characters.
- Press Generate again for a new batch, or Copy to take them all, one per line.
How it works
For every position the tool draws a uniformly random index into the alphabet using the browser’s secure generator, rejecting values that would favour some characters. Characters are handled as whole code points, so a custom alphabet with emoji stays intact.
Example
Length 8 with only digits gives strings such as 40719352. Length 6 with the custom alphabet ACGT gives DNA-like strings such as TGACCA.
Tips
- Need a standard identifier? The UUID generator makes version 4 UUIDs.
- Strings are not checked against each other, so very short strings from a small alphabet can repeat.
Frequently asked questions
Is this random enough for passwords or tokens?
The characters come from the browser's cryptographically secure random generator, with no modulo bias, so each position is uniform over the alphabet. For passwords that must contain a character from every set, use the password generator, which guarantees that.
How does the custom alphabet work?
Type any characters and every string is built only from them. Repeated characters are counted once, so typing AABC is the same as ABC. While the box is not empty, the checkbox sets are ignored.
Which characters count as look-alikes?
The capital I, lowercase l, digit 1, capital O, digit 0 and lowercase o. Leaving them out makes strings easier to read aloud or copy from paper.
How long a string do I need to make a guess hard?
Each character adds log base 2 of the alphabet size in bits. Lowercase letters and digits give 36 characters, about 5.17 bits per character, so 16 characters carry roughly 83 bits.