Use this free random string generator to create random text of any length from letters, numbers, symbols, or your own character set. Generate one string or a list of up to 20, and copy them with one click. Everything runs in your browser, so nothing you create is sent to our servers.
A random string is a sequence of characters that cannot be predicted. Use one for test data, temporary codes, placeholder IDs, or any case where a fixed pattern would be a problem.
How to use the random string generator
- Choose the characters: pick a preset set, or choose Custom and type the characters you want.
- Set the length: drag the slider from 4 to 128 characters.
- Avoid lookalikes (optional): leaves out characters that are easy to confuse.
- Choose how many: generate 1, 5, 10, or 20 strings.
- Copy: copy the results with one click.
Character sets at a glance
| Set | Characters | Good for |
|---|---|---|
| Letters and numbers | A–Z, a–z, 0–9 | General IDs and codes |
| Letters only | A–Z, a–z | Words-style placeholders |
| Numbers only | 0–9 | PIN-style or numeric codes |
| Hex | 0–9, A–F | Hash-style test values |
| With symbols | Letters, numbers, and common symbols | Strong, hard-to-guess strings |
Worked examples
A 16-character test ID
Keep the default letters and numbers set at 16 characters. Each result is a unique-looking ID such as k7Qa2RzP9mXb4LwT.
A numeric code
Choose numbers only with a length of 6 to create a six-digit code for a test system.
A readable code for a person
Choose letters and numbers, turn on avoid lookalikes, and use 8 characters. The result is easier to read aloud or type.
Common mistakes
- Using a short length for secrets. Short strings are easier to guess. Use at least 16 characters for anything sensitive.
- Leaving the custom set empty. Type at least one character before choosing Custom, or the tool will ask you to add one.
- Assuming a repeated character is an error. Random strings can repeat characters, which is normal for a random result.
Frequently asked questions
What is a random string?
A random string is a sequence of characters chosen at random from a set, such as letters, digits, or symbols. Random strings are used for test data, IDs, temporary codes, and placeholder text.
Are the strings secure?
The tool uses your browser's cryptographically secure random source, so the output is unpredictable. For account passwords, a longer string with symbols is recommended.
What does avoid lookalike characters mean?
It removes characters that are easy to confuse, such as 0 and O, 1 and l, and I and l. This helps when people need to read or type the string by hand.
How long should a random string be?
Longer strings are harder to guess. For most uses, 16 to 32 characters is a good range. Use a longer length for high-security needs.
Is the Xornex random string generator free?
Yes. The Xornex random string generator is available to use free of charge.