Skip to content
/ API key and UUID generator

API key and UUID generator

An API key, a session secret, an HMAC signing key or a version 4 UUID, drawn with the browser's cryptographic randomness: in hexadecimal, Base64 or Base64url, from 16 to 64 bytes. Several at once if needed.

How to do it

  1. Choose the format: hexadecimal, Base64, Base64url (no + / =) or UUID v4.
  2. Choose the size: 32 bytes (256 bits) for an HMAC-SHA256 secret.
  3. Copy the key, or make several in “Several at once”.
  4. Store it in an environment variable or a secrets vault.

Tips

  • Never put a secret key in code pushed to a repository.
  • Base64url works unescaped in a URL or file name.
  • A UUID v4 identifies; for a secret, prefer 32 random bytes.

Frequently asked questions

How long should an API key be?

At least 128 bits (16 bytes); 256 bits (32 bytes) is the usual value for an HMAC-SHA256 signing secret or an encryption key.

How is the UUID v4 made?

122 random bits drawn with crypto.getRandomValues, plus the 6 bits fixed by the standard (version 4, RFC 4122 / 9562 variant).

Is the password sent anywhere?

No: it is created in your browser with cryptographic randomness (crypto.getRandomValues) and is neither sent nor saved; only your settings are kept on your device.