admin@likeapro.dev: ~/secrets — zsh

// admin tools · 03

Secret generator

Passwords, diceware passphrases, API keys, raw signing secrets and whole .env blocks — drawn from the browser's CSPRNG with rejection sampling, scored in bits.

// runs locally — nothing is uploaded

24

pool: — chars

Enter regenerate

output

entropy 0 bits —
crack time ≈ — offline, 1012 guesses/s, average case
GEN local only · 0 bytes sent · csprng --:--:--

How it works

What it does

Generates strong random secrets for the jobs developers and admins actually have: passwords, memorable passphrases, prefixed API keys, raw keys for HMAC, JWT and encryption, and a ready-to-paste .env block. Every value comes from the browser's cryptographically secure generator and never leaves your device.

How to use it

  1. Choose a tab: password, passphrase, api key, raw secret or .env.
  2. Adjust the options. Passwords run from 8 to 128 characters, with character sets, ambiguous characters excluded (Il1|O0o and quotes) and a custom exclude list. Passphrases take 3–14 words with a separator, capitals and an optional digit. API keys get a prefix such as sk_live_ and a base62, hex or base64url body. Raw secrets are 16, 32 or 64 bytes in hex, base64 or base64url.
  3. Set -n to generate up to 100 at once, then copy. Press Enter to regenerate.

How the entropy estimate works

Entropy is calculated from how the secret was generated, not by guessing at patterns. A random password of length L drawn from a pool of N characters has L × log₂(N) bits. A passphrase uses the built-in list of about 1,500 words (roughly 10.6 bits per word), plus a little for the optional digit. Raw secrets are simply 8 bits per byte.

The crack-time figure assumes an offline attacker making 1012 guesses per second against a fast hash, finding the secret halfway through the keyspace on average. It's a deliberately pessimistic yardstick, not a promise.

< 50 bits
weak — guessable offline
72–100 bits
strong for human-held passwords
128+ bits
appropriate for API keys and machine secrets

Randomness

All output uses crypto.getRandomValues. Characters and words are chosen by rejection sampling, which discards out-of-range values instead of using modulo, so every character in the pool is equally likely. Math.random is never used.

FAQ

Password or passphrase?

For anything stored in a password manager, use a long random password. For something you must type or remember, such as a laptop login or the manager's own master password, a 6–7 word passphrase gives similar strength and is far easier to type.

How long should a JWT or HMAC secret be?

At least as long as the hash: 32 bytes (256 bits) for HS256, 64 bytes for HS512. The raw secret tab's 32 B and 64 B options match those.

What's in the .env tab?

Common keys such as APP_KEY, JWT_SECRET, SESSION_SECRET, ENCRYPTION_KEY, NEXTAUTH_SECRET, WEBHOOK_SECRET and database passwords, each in the format and length that framework expects. Tick the ones you need.

Are the generated secrets stored anywhere?

No. They exist only in the page until you close or regenerate it, and nothing is sent over the network.