Random Hex Generator
Generate random hexadecimal strings of any length. Lowercase, uppercase, with or without 0x prefix. Cryptographically secure, runs in your browser.
Reference
How does the hex generator work?
This tool fills a Uint8Array with random bytes from crypto.getRandomValues(), then encodes the bytes as hexadecimal characters (0-9, a-f). Each character represents 4 bits of entropy. A 32-character hex string carries 128 bits of cryptographic randomness — equivalent to a UUID.
Common uses
- Session tokens — generate API keys, CSRF tokens, and bearer tokens.
- Salts and nonces — provide unique values for hashing and encryption.
- Identifiers — create short IDs for short-lived resources.
- Test fixtures — populate hex columns (transaction IDs, hashes, color codes).
Privacy
All strings are generated 100% in your browser. No data is sent to any server.