>_devtools

Random Bytes and Secure Token Generator

Generate random bytes as hex, Base64, or Base64url, and secure API tokens with an optional prefix.

What this does

Generate cryptographically secure random bytes and print them as hex, uppercase hex, Base64, or URL-safe Base64 (Base64url). Use it for encryption keys, salts, nonces, session secrets, and test data. Choose 1 to 65,536 bytes per value.

Secure tokens

The Token mode builds API keys and secrets: pick the strength in bytes (16 bytes is 128 bits, 32 bytes is 256 bits), an encoding, and an optional prefix such assk_live_. Base62 produces only letters and digits, which is safe to paste into any field. The prefix is not random and adds no strength.

Choosing a size

  • 16 bytes (128 bits): session IDs and unguessable identifiers.
  • 32 bytes (256 bits): AES-256 keys, HMAC secrets, and long-lived API tokens.
  • 12 bytes: AES-GCM nonce. 16 bytes: a typical password salt.

Randomness source

All bytes come from crypto.getRandomValues, the browser's secure random generator. Fixed-size Base62 tokens use rejection sampling so no character is favoured.

Privacy

Keys and tokens are generated in your browser and never uploaded, logged, or stored. Copy them straight into your secret manager.