Tool

Session / CSRF Secret Generator

CSPRNG session and CSRF secrets with .env copy. Client-side only.

Runs entirely in your browser — no data sent to servers. Privacy policy
Prove it runs locally
  1. Open DevTools → Network tab
  2. Click Generate
  3. Confirm zero outbound requests for the secret

Generation uses crypto.getRandomValues() in your browser. Privacy policy

How to Use This Tool

Choose Session or CSRF — this only changes the .env variable name (SESSION_SECRET vs CSRF_SECRET). Entropy is identical.

Pick a byte length (32 / 48 / 64) and output format (base64url default, hex, or base64). Click Generate, then Copy or Copy for .env.

Paste into your deployment environment. Keep SESSION_SECRET distinct from JWT_SECRET. Optional CLI snippets mirror openssl / Node / Python.

Continue learning