Random String Generator
Create secure random strings of any length from the character sets you choose. Useful for API keys, tokens, salts and identifiers. Generation is entirely client-side.
This tool runs entirely in your browser. Nothing you type or generate is uploaded, stored or logged.
Options
Between 1 and 512 characters.
Choosing a length
Unlike a password, a machine-generated secret is usually stored hashed or compared byte-for-byte, so you can make it long without memorising it.
- Session tokens: 128 bits or more (32 hex characters).
- API keys: 192–256 bits is a reasonable default.
- Database salts: 128 bits is the conventional minimum.
- CSRF tokens: 128 bits; they are short-lived, but there is no reason to be cheap.
Values are never stored or transmitted. Copy the value into the application that needs it, then clear your clipboard history if the environment is shared.
