Skip to content
TabKiwiTabKiwi

Secret Key Generator

128- to 512-bit secret keys in hex, Base64 or Base64URL, plus a ready .env line.

SecurityRuns in your browser. Your files never leave this device.
Loading tool…

About this tool

Creates high-entropy secrets for signing JWTs, encrypting sessions, webhooks and app configuration. Pick a key size and copy the value in the encoding your framework wants, or grab a complete .env line with your variable name. The key is generated with WebCrypto randomness in this tab only.

How to use Secret Key Generator

  1. Select the key size (256-bit fits most uses).
  2. Type the environment variable name your app reads.
  3. Copy the key or the full .env line into your configuration.

Frequently asked questions

What size key do I need for HS256 JWTs?

At least 256 bits, which matches the SHA-256 output size used by HS256.

Can I reuse one secret across apps?

Better not. Give each app and environment its own secret so one leak does not expose the others.

Where should I keep the secret?

In a secrets manager or environment variable, never in source control or front-end code.

More Security tools

View all 20 →