All tools

Random Bytes

Cryptographically secure random bytes in any encoding.

256 bits of entropy

Cryptographically secure random bytes from crypto.getRandomValues. 32 bytes (256 bits) is the standard for session tokens, AES keys, and salts. Bytes never leave your browser.

About

Pick byte count and output format (hex, base64, base64 URL-safe, binary, decimal array, hex octets). Uses crypto.getRandomValues. Bytes never leave your browser.

How to use

  1. Pick byte count.
  2. Pick encoding.

FAQ

How many bytes should I use?+

32 bytes (256 bits) is the standard for session tokens, API keys, and AES keys. 16 bytes for a UUID. 8 bytes is the minimum for anything that needs uniqueness over time.