Random String Generator
Generate random strings using your browser's cryptographic random source. Pick the length and character set for passwords, API keys, tokens or test identifiers.
Random strings
Press Generate to get a result.
About the Random String Generator
Why the random source matters here
Most random string generators on the web use Math.random, which is fast, convenient and completely unsuitable for anything secret. Its output is predictable from a handful of previous values, so a string generated with it should never become a password, a token or an API key.
This one uses crypto.getRandomValues, the browser's cryptographically secure generator, with rejection sampling so the character distribution stays uniform rather than skewing toward the start of the alphabet.
Choosing a length
For a password, 16 alphanumeric characters gives roughly 95 bits of entropy, which is comfortably beyond brute force. For an API key or token, 32 characters is the usual convention. Hexadecimal is the right choice when the value has to survive systems that mangle mixed case or punctuation.
Because everything happens in your browser and nothing is transmitted or stored, the generated value exists only on your screen — which is the only way a generated secret should work.