RandomKeygen
Free · Private · Client-sideGenerated locally — never transmitted

Random Hex Generator

Generate cryptographically secure random hexadecimal strings, 32-char and 64-char hex keys, salts, and byte sequences locally in your browser using the Web Crypto API.

Estimated entropy: 256 bits · 64 hex chars (32 bytes)~132,943,112,026,157,700,000,000,000,000 quintillion times the age of the universe to crack
Weak · <50 bitsFairGood · 70+Strong · 100+

In plain terms: a gaming PC guessing a million passwords per second would need 132,943,112,026,157,700,000,000,000,000,000,000 quintillion times the age of the universe. Even someone renting every cloud server on Earth — a trillion guesses per second — would need 132,943,112,026,157,700,000,000,000,000 quintillion times the age of the universe. Nobody is guessing this password; the only realistic risks are it being reused or phished.

Generated hex strings

Strong256 bits
Strong256 bits
Strong256 bits
Strong256 bits
Strong256 bits
Strong256 bits
Click any value to copy · R regenerates6 hex strings · local-only
hex strings

Hex Length Quick Reference

Hex CharsBytesEntropyCommon Use
16 chars8 bytes64 bitsShort nonces, trace IDs, correlation tokens
32 chars16 bytes128 bitsAES-128 keys, cryptographic salts, UUID hex
64 chars32 bytes256 bitsAES-256 keys, HMAC-SHA256 secrets, API/CSRF tokens
128 chars64 bytes512 bitsHMAC-SHA512 secrets, JWT HS512, RFC 8784 PPKs

Generate Random Hex in CLI & Code

Generate 64 random hex characters (32 bytes) with OpenSSL

$openssl rand -hex 32

Generate cryptographically secure hex in Python 3

$python3 -c "import secrets; print(secrets.token_hex(32))"

Generate random hex in Node.js

$node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
random-hex.ts
// Browser / Web Crypto API (zero dependencies)
const bytes = new Uint8Array(32)
crypto.getRandomValues(bytes)
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('')
console.log(hex) // 64 lowercase hex characters (256 bits)

Related Generators

1 hex character = 4 bits of entropy

Every two hexadecimal characters (0–9, a–f) represent one random byte (8 bits). A 64-character hex string equals 32 random bytes (256 bits)—the standard size for AES-256 keys, HMAC-SHA256 secrets, and API tokens. Need the exact OpenSSL CLI equivalent? Try openssl rand -hex 32 or openssl rand -base64 32.