Security & Crypto Tools
CSPRNG Random Bytes / Number Generator
Generate cryptographically secure random bytes and integers.
Loading tool…
What is CSPRNG?
A minimal CSPRNG tool for developers who need genuine randomness: raw bytes in hex plus a uniform random integer.
How it works
Both outputs read from crypto.getRandomValues, the browser's cryptographically secure random source.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Secure random bytes
Generate crypto-grade random numbers, hex bytes, or base64 blobs for security-sensitive applications.
Common mistakes
Formatting the output
Raw bytes aren't copy-friendly — encode as hex or base64 for keys and tokens rather than re-rolling.
Frequently asked questions
What makes it cryptographically secure?
It uses the browser's crypto.getRandomValues, backed by the OS entropy source — not a predictable PRNG.
What is it used for?
Salts, IVs, nonces, key material, and any random value where predictability is a security risk.