128-bit Secret Generator

Create 128-bit (16-byte) secrets with our secure random key generator. Export as hex, Base64, Base64URL, or a UUID-style string for keys, session IDs, and signing material.

  • Free
  • No signup
  • Private

Privacy & security: Your generated secrets and hashes are processed locally in your browser whenever possible and are not stored on our servers.

Generates 128-bit (16 bytes) cryptographically secure random data.

Your generated secrets and hashes are processed locally in your browser whenever possible and are not stored on our servers.

Overview

Create 128-bit (16-byte) secrets with our secure random key generator. Export as hex, Base64, Base64URL, or a UUID-style string for keys, session IDs, and signing material.

Benefits

  • 128 bits of entropy for stronger keys
  • Four output formats
  • Instant generation in the browser
  • Privacy-first — nothing uploaded

Use Cases

  • Symmetric key material (with proper KDF in production)
  • OAuth state parameters
  • Database record identifiers
  • Webhook and HMAC secrets

Users Also Use

How to Use

  1. Choose hex, Base64, Base64URL, or UUID-like format.
  2. Click Generate Secret.
  3. Copy and use in your application configuration.

What is a 128-bit secret?

A 128-bit secret is 16 bytes of cryptographically secure random data, which gives 2^128, about 3.4 × 10^38, possible values. That is far beyond what any computer can guess by trying every value, so 128 bits is the usual minimum for tokens that protect accounts. This tool generates the bytes with crypto.getRandomValues() in your browser; they are not sent to or stored on our server.

Output formats

  • Hex: 32 characters (0–9, a–f)
  • Base64: 24 characters, ending with == padding
  • Base64URL: 22 characters, no padding, safe in URLs and cookies
  • UUID-like: the 32 hex characters grouped 8-4-4-4-12 with hyphens. This is just formatting. It is not a standards-compliant UUID because it has no version or variant bits; use the UUID Generator if a system validates UUIDs.

Good uses for 128 bits

  • Session IDs and remember-me tokens
  • Password reset and email verification links
  • API tokens and webhook secrets
  • AES-128 encryption keys
  • CSRF tokens and OAuth state values

For HMAC-SHA256 signing keys, JWT HS256 secrets and AES-256 keys, use the 256-bit Secret Generator, because those algorithms are designed for 256-bit keys.

Handling the secret safely

Store tokens that act like passwords, such as reset tokens and API tokens, as a hash in your database, so a database leak does not expose working tokens. Give them an expiry time, and keep encryption keys in an environment variable or a secrets manager rather than in source code.

FAQ

What is a 128-bit secret used for?
Common uses include session identifiers, API keys, and encryption-related secrets where 16 bytes of entropy is appropriate.
Is this the same as a UUID?
UUID-like output formats 16 bytes similarly to UUIDs, but this is raw random bytes — not a standard UUID v4/v7 structure unless you use the UUID-like option.
Are secrets stored on your server?
No. All processing happens locally in your browser.
Is 128 bits secure enough?
Yes, for tokens and IDs. Guessing a random 128-bit value is not practical with any current or foreseeable classical computer.
How long is a 128-bit key in hex?
32 hexadecimal characters, because each character represents 4 bits.
Is the UUID-like format a real UUID?
No. It uses the UUID layout but all 128 bits are random, so the version and variant fields are not set. Use the UUID Generator for standard v4 UUIDs.

Keep exploring