Tool

JWT Secret Generator

RFC 7518–aware secrets for HS256/HS384/HS512. Output as base64url, hex, or base64 — client-side only.

Last updated July 1, 2026

Runs entirely in your browser — no data sent to servers. Privacy policy

How to Use This Tool

Choose HS256, HS384, or HS512. The generator enforces RFC 7518 minimum key lengths (32 / 48 / 64 bytes) so you cannot accidentally create an undersized secret for the selected algorithm.

Pick an output format: base64url (default, JWT-friendly), hex, or standard base64. Click Generate to create a cryptographically random secret with crypto.getRandomValues(). Use Reveal to show the full value, Copy to copy the secret, or Copy for .env to copy a JWT_SECRET=… line.

Paste the secret into your deployment environment (never hardcode it). Optional CLI snippets below the widget show equivalent openssl, Node.js, and Python one-liners for the same size and format.

Continue learning