TL
Tool Lab
💰Donate
💰Donate

Secret Key Generator

Generate AES, HMAC-SHA, and JWT secret keys using the browser crypto API.

Key Type
Output Format
256 bits · 32 bytes · 32-byte symmetric encryption key (recommended)

About This Tool

The Secret Key Generator produces cryptographically secure random keys for common algorithms using crypto.getRandomValues.

Key length matches the algorithm specification exactly. Nothing is sent to any server — generation is entirely local.

How to Use

  1. Select the Key Type matching your use case.
  2. Choose the Output Format your application expects.
  3. Click Generate Key.
  4. Copy the key and store it securely — use a secrets manager in production.

Use Cases

Backend developers generate AES-256 keys for encrypting data at rest. Node.js engineers generate HMAC-SHA-256 keys for signing webhooks. Express developers generate session secrets.

FAQ

  • Are these keys safe for production?Yes, keys are cryptographically random. Always store securely using a secrets manager, never hard-code.
  • Difference between hex and URL-safe Base64?Hex is 2× longer but uses only 0-9 and a-f. URL-safe Base64 is shorter and safe in environment variables and URLs.
  • Is there a limit on keys I can generate?No. Each click produces a fresh, independent key.