Hoglet

Random token generator

256 bits of randomness32 bytes · 64 characters

128 bits can’t be guessed; 256 is the usual choice for keys and signing secrets.

Made on this device

Random Token Generator: Hex, Base64, API Keys, Private

Make random secrets as hex, Base64 or letters.

A token is a secret made of pure randomness, for a machine to check rather than a person to remember: an API key, a session or signing secret, a salt, a reset link. Choose how it is written (hex, Base64, URL-safe Base64 for links and file names, or letters and digits only) and how much randomness it holds, from 64 to 512 bits; 128 bits is beyond guessing, and 256 is the usual choice for keys. The randomness comes from your browser’s cryptographic generator (crypto.getRandomValues), the same one it uses for secure connections. A prefix such as sk_live_ can be put in front: it helps tell keys apart and adds no strength. Up to 50 can be made at once, one per line. Tokens are made on this device, never sent anywhere, and forgotten when the window closes. For a password a person types, use Password generator.

How to use Random token generator

  1. Choose how the token is Written as: Hex, Base64, URL-safe or Letters and digits.
  2. Set the Bits, and add a Prefix or more tokens in Options.
  3. Press Copy, or Copy all for several tokens, one per line.

Random token generator: common questions

Is it safe to generate API keys with an online tool?

Hoglet’s random token generator takes its randomness from your browser’s cryptographic generator (crypto.getRandomValues), on your device. Tokens are never sent anywhere and are forgotten when the window closes.

How many bits should a random API key or secret have?

128 bits is beyond guessing, and 256 is the usual choice for keys and signing secrets. The random token generator goes from 64 to 512 bits; 64 is enough for an ID that must not collide, not for a secret.

What is the difference between a random token and a password?

A token is pure randomness for a machine to check, such as an API key, a salt or a reset link, and nobody has to remember it. For a password a person types, use Password generator instead.

Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.