Random Secret Key Generator (Hex / Base64)

Generate cryptographically random secrets. Enter a byte length (default 32).

About this tool

Uses the browser Web Crypto API; nothing is sent anywhere. 32 bytes (256 bits) suits HMAC-SHA256 JWT secrets and session keys. Store secrets in environment variables, not source control.

Related: JSON Formatter & Validator · Base64 Encode & Decode · URL Encoder & Decoder · SHA-256 / SHA-1 Hash Generator · Unix Timestamp Converter