NEXTAUTH_SECRET

Generate a secure 32-byte random hex string.

Generated Output
Click generate to create...
How to useAdd this to your .env or .env.local file as NEXTAUTH_SECRET=your_generated_secret. It is used to encrypt the NextAuth.js JWT and hash email verification tokens.

What is this generator?

NextAuth.js requires a NEXTAUTH_SECRET environment variable to encrypt JSON Web Tokens and hash verification tokens securely. A weak or missing secret will cause security warnings or errors in production environments. This tool securely generates a high-entropy hex string designed specifically for these configurations.

How to integrate

  • 1Click the Generate button to create a secure 32-byte string.
  • 2Click the copy icon to save it to your clipboard.
  • 3Open your project's environment file (e.g., .env.local).
  • 4Paste it as NEXTAUTH_SECRET=your_string