Random Byte Generator
Generate cryptographically secure random bytes using the Web Crypto API. Output in hex, base64, binary, decimal, or array format.
Configuration
Output
Click Generate to create random bytes
CSPRNG Source
Uses crypto.getRandomValues() - the browser's cryptographically secure PRNG.
Multiple Formats
Output in hex, base64, binary, decimal, or JavaScript array notation.
Configurable
1 to 1024 bytes with separator and case options for hex output.
Download & Copy
One-click copy or download the generated bytes as a text file.
Frequently Asked Questions
Is this truly random?
Yes. We use crypto.getRandomValues() which is backed by the OS-level CSPRNG (e.g., /dev/urandom on Linux, CryptGenRandom on Windows). This is the same source used for TLS and key generation.
What can I use this for?
Generating encryption keys, initialization vectors (IVs), nonces, salts, session tokens, API keys, or any scenario requiring unpredictable random data.
Is Math.random() the same?
No! Math.random() is NOT cryptographically secure. It's predictable and must never be used for security-sensitive randomness. Always use crypto.getRandomValues() instead.
How much randomness do I need?
16 bytes (128-bit) for AES-128 keys and IVs. 32 bytes (256-bit) for AES-256 keys. 12 bytes for GCM nonces. 16+ bytes for salts.
Use random bytes as encryption keys
Generate keys, then use them with our AES or RSA encryption tools.
