ExtraTools

SECURE KEY GENERATOR

RANDOM BYTES · APP SECRETS · LOCAL

Generate secure secret keys from random bytes

Create cryptographically secure application secrets with the browser Crypto API. Choose a common key preset, byte length, and HEX, Base64, or Base64URL output.

Use the code examples to generate keys in PHP, Node.js, Python, Go, or Ruby. Generated values stay in your browser; store production secrets outside public source code.

Full mode is active — custom byte length, encoding, and code examples are available.
01 / KEY SETTINGSGenerated on this device

Choose a key type

Choose a preset and generate a key. Processing stays in this browser.

Generated secret

Generated secret

Entropy: 256 bits
Code to generate a key

Code to generate a key

This code creates a new random key when run in your application.

What this secure key generator can create

Use cryptographically secure random bytes for application secrets and keys. The tool only generates random values; it does not create a hash from text or replace a password-hashing function.

  • Presets for application secrets, Laravel APP_KEY, AES-128 / AES-192 / AES-256, HMAC signing, and URL-safe tokens.
  • Encode random bytes as HEX, Base64, or Base64URL, with an optional short prefix.
  • Copy generation examples for PHP, Node.js, Python, Go, or Ruby.
  • Choose 1–4096 random bytes and review the corresponding entropy in bits.
  • Uses the browser cryptographic API. Generated values are not uploaded or stored by this tool.

Generate and use a secret key

Choose a preset or customize the number of random bytes and output format, then generate a new value.

Could not generate the key

Check the selected length and browser security support.