openssl rand -hex 32

Category: Security & Hardening

openssl rand -hex 32

Generate 32 random bytes as hex

Outputs 64 hex characters of cryptographically strong randomness, ideal for API keys, database passwords, or salts. Use a real random source for secrets, never predictable patterns. Adjust the length with the byte count, for example openssl rand -hex 16.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.