Secret Generator (in your browser)

LocalRuns in your browser; files and input stay on this deviceFreeFree to use

Cryptographically secure random secrets for JWT signing, API keys, session secrets, and environment variables. Generated locally - your secret never leaves the browser.

Secret length
Secret length
32
Output
Click generate
Excellent128 bits of entropy

Entropy measures how many equally likely values this generator could have produced. It describes the generator, not how the value is stored or used afterwards.

Generated with the Web Crypto API. Nothing is sent to a server.
Runs in your browser; files and input stay on this device

How to use Secret Generator (in your browser)

  1. 1Choose HEX, Base64, or URL-safe Base64 output.
  2. 2Set the required encoded length from 8 to 255 characters.
  3. 3Generate the secret, check the displayed entropy estimate, and copy the result.

Frequently asked questions

How is the secret generated?
The browser fills random bytes with crypto.getRandomValues, then encodes them in the selected format. No dictionary words or predictable timestamps are used.
What is the difference between Base64 and Base64url?
Base64url replaces + and / with URL-safe characters and removes trailing padding. It is more convenient in URLs, cookies, and JSON tokens.
Does the selected length equal the number of random bytes?
No. It is the encoded character length. HEX uses two characters per byte, while Base64 represents bytes in groups that produce roughly four characters for every three bytes.