Strapi APP_KEYS Generator
Every Strapi .env secret at once — the full six-field block, copy-ready.
Every secret Strapi needs, in one block
A Strapi project refuses to boot without a set of secrets in its .env, and the generator above produces all six at once as a paste-ready block: APP_KEYS, API_TOKEN_SALT, ADMIN_JWT_SECRET, JWT_SECRET, TRANSFER_TOKEN_SALT and ENCRYPTION_KEY. That last one is easy to forget — many walkthroughs list only five — and a missing ENCRYPTION_KEY breaks encrypted fields on newer Strapi. If you have hit Middleware "strapi::session": App keys are required, that is the APP_KEYS line this page fills in.
APP_KEYS is four keys, not one
APP_KEYS is a comma-separated list — create-strapi-app generates exactly four — and Strapi rotates the session-signing key across them. The scaffolder makes each value 16 random bytes in standard base64 (a 24-character string ending in ==), and every field uses that same shape. Strapi validates none of it: a wrong-length value fails silently rather than erroring, so the safe move is to generate the whole block correctly rather than hand-editing one line.
Why the JWT secrets here are longer than the default
One honest deviation, and you can turn it off. ADMIN_JWT_SECRET and JWT_SECRET sign HS256 JSON Web Tokens, and RFC 7518 §3.2 requires an HS256 key of at least 256 bits — which is 32 bytes, not the 16 the Strapi CLI ships. So this generator emits 32 bytes for those two secrets by default, and 16 for the four that do not sign tokens, matching the CLI everywhere it matters. If you would rather reproduce create-strapi-app byte for byte, tick "match create-strapi-app exactly" and every field drops to 16 bytes. Either way, keep the block in .env, out of the repository, and use a fresh one per environment.
Middleware "strapi::session": App keys are required — how do I fix it?
Strapi refuses to boot without APP_KEYS in your .env. Generate the full block above and paste it in — APP_KEYS is the line this error is about, but the same run gives you every other secret Strapi needs too.
What secrets go in a Strapi .env?
Six: APP_KEYS, API_TOKEN_SALT, ADMIN_JWT_SECRET, JWT_SECRET, TRANSFER_TOKEN_SALT and ENCRYPTION_KEY. Older guides list only five and omit ENCRYPTION_KEY, which newer Strapi needs for encrypted fields — this generator includes all six.
How many APP_KEYS does Strapi need?
APP_KEYS is a comma-separated list and create-strapi-app generates exactly four. Strapi rotates the session-signing key across them. Each is 16 random bytes in standard base64 — a 24-character value ending in ==.
Why are the JWT secrets here longer than create-strapi-app's?
Because ADMIN_JWT_SECRET and JWT_SECRET sign HS256 tokens, and RFC 7518 requires an HS256 key of at least 32 bytes — the Strapi CLI ships 16. This generator emits 32 bytes for those two by default and 16 for the rest; tick "match create-strapi-app exactly" to reproduce the CLI byte for byte.
Nothing leaves your browser
- Don't take our word for it — turn off your wifi. Every generator on this site keeps working with the network disconnected. That's the whole proof, and it takes five seconds.
- Every value comes from
crypto.getRandomValues()— the CSPRNG built into your browser, neverMath.random(). - Generated secrets are never transmitted, logged or stored: no server-side generation, no cookies, no localStorage.
- Verify it yourself in the network tab: after loading, the page only talks to our self-hosted, cookie-less analytics — which counts page views and which generator type gets copied, never any value.
- Strict Content-Security-Policy; no third-party script origins.
All generators
- Base64 Secret Generator
- UUID Generator
- Password Generator
- Hex Secret Generator
- JWT Secret Generator
- Passphrase Generator
- SSH Key Generator (Ed25519)
- PIN Generator
- WireGuard Key Generator
- API Key Generator
- TOTP Secret Generator
- Django SECRET_KEY Generator
- Laravel APP_KEY Generator
- NextAuth Secret Generator
- Flask SECRET_KEY Generator
- Rails secret_key_base Generator
- ULID Generator
- Nano ID Generator