RandomKeygen

Local-only · Stack-ready .env bundles

.env Secret Generator

Bootstrap a complete, cryptographically secure .env.local file for your framework in one click — every key generated locally in your browser with the Web Crypto API.

Next.js / Auth.js

    Click any line to copy KEY=value · R regenerates all.env.local
    Secrets in bundle6 keysNext.js / Auth.js preset
    Minimum entropy190+ bitsEvery key generated via Web Crypto CSPRNG
    Target file.env.localReady to paste or download directly

    Environment secret hygiene

    Three rules that keep credentials out of git history and production incidents.

    01
    Gitignore every secret fileCommit only a sanitized .env.example with placeholder descriptions. Add .env, .env.local, and .env.*.local to .gitignore before your first commit.
    02
    Isolate per environmentNever reuse local or staging secrets in production. Generate a fresh bundle for dev, preview, staging, and production so a single leak stays contained.
    03
    Rotate on schedule & offboardingInject production secrets through your hosting provider or KMS (Vercel, Wrangler, AWS Secrets Manager) and rotate immediately if a developer or CI runner is compromised.

    Deploy & protect your secrets

    Copy ready-to-run commands synced to your active stack's variable names.