Generate secrets for configuration files, API tokens, session keys, HMAC keys and similar uses. All randomness comes from crypto.getRandomValues in your browser, and nothing leaves the page.

There are two ways to size the output:

  • Bytes of randomness (hex, Base64, Base64URL): generates exactly N random bytes and encodes them. A 32-byte value is a 256-bit key regardless of how many characters the encoding produces.
  • Characters: picks each character uniformly from the alphabet with rejection sampling. Entropy is length × log2(alphabet size), shown under the options.

Presets cover the common cases: 128- and 256-bit keys in hex, a 256-bit Base64 key (for things like openssl rand -base64 32 replacements), URL-safe session tokens, alphanumeric API tokens and a Django SECRET_KEY-style string.

Treat generated values as live secrets: copy them straight into your secret store or .env file and avoid pasting them into chat or tickets.