๐ฒ Random String Generator
Generate secure random strings with a chosen length and character set (uppercase, lowercase, numbers, symbols). Useful for passwords, API keys, or temporary IDs.
How to use
- Set the length of the string to generate.
- Check the character sets to include (uppercase, lowercase, digits, symbols).
- Click "Generate" to see the result, then click "Copy" to copy it.
How the calculation works
This tool draws 32-bit random numbers from the browser's cryptographically secure generator (crypto.getRandomValues) and picks each character from the combined set of character types you select. The types are 26 uppercase letters, 26 lowercase letters, 10 digits and 18 symbols (! @ # $ % ^ & * ( ) - _ = + [ ] { }). The strength of a random string is its entropy โ how hard it is to guess, in bits โ calculated as length ร logโ(set size). With every type selected the set has 80 characters, about 6.3 bits per character. Each character is chosen using the remainder of the random number divided by the set size. Because a 32-bit number is vastly larger than the set (at most 80), any bias towards particular characters is negligible in practice.
Worked example
16 characters using every character type Entropy: 16 ร logโ(80) โ 101.2 bits With letters and digits only (62 characters), 32 characters give 32 ร logโ(62) โ 190.5 bits. Around 128 bits or more is a common target for API keys and tokens โ roughly 22 or more alphanumeric characters.
Things to be aware of
- Some services restrict which symbols you can use. If symbols cause an error, drop them and add length instead.
- For passwords you need to remember and type, a passphrase made of words may be easier to use.
- Generated strings disappear when you close the page; save any you need in a password manager.
- Everything happens in your browser; nothing is sent anywhere.
FAQ
Are the generated strings cryptographically secure?
Yes โ it uses the browser's cryptographic random number generator (crypto API), producing strings that are hard to predict.
Can I generate several at once?
Yes โ set the count you want and copy them all in bulk.
How long should a password be to stay secure?
Combining several character sets with a length of 12+ characters is a common guideline for a strong password. Adjust the length to fit your use case.
Can I use this to generate an API key or token?
Yes โ select only letters and digits to generate a random string in a format most systems accept easily as an API key or token.
Is the generated string sent to a server?
No, generation happens entirely in your browser and nothing is sent externally.