Random String Generator
Generate random strings of any length from letters, digits, hex, Base64URL or your own set of characters, many at once.
Random String Generator creates random strings of any length up to 1,024 characters from letters and digits, hex, Base64URL or your own set of characters, up to 1,000 at a time. It uses cryptographic randomness with no bias toward any character.
What is a random string used for?
Random tokens
Random strings serve as API keys, invitation codes, test data, file names and session IDs. For anything security related, they must come from a cryptographic generator, which this tool uses, and be long enough: 32 alphanumeric characters give about 190 bits.
Why use Random String Generator?
- Secure source. Characters come from crypto.getRandomValues with rejection sampling, so every character is equally likely.
- Your own alphabet. Use a custom set, for example capitals and digits without 0, O, 1 and I for codes people type.
- Bulk output. Generate up to 1,000 at once and download them as a text file.
How to use Random String Generator, step by step

- Pick the characters in Random String Generator. A preset, or your own set.
- Set the length and how many. Up to 1,024 characters and 1,000 strings.
- Press Generate and copy. One string per line.
Frequently asked questions
How long should a token be?
For secrets, at least 128 bits: 22 alphanumeric characters, 32 hex characters or 22 Base64URL characters.
Are repeated characters in my custom set counted twice?
No. Duplicates are removed first, so each distinct character has an equal chance.
Can two strings come out the same?
With short lengths and a small set, yes, by chance. With 16 or more characters it is vanishingly unlikely.
Looking for the long version? The guides cover each of these jobs in depth.