🔐 encrypt.toolsALL TOOLS
CSPRNG · UNIFORM

Cryptographically Secure Random Number Generator

Unbiased integers, dice, and raw bytes from the CSPRNG.

loading tool…
FIELD NOTES

About this tool

Math.random() is fine for games and fatal for secrets. This generator uses crypto.getRandomValues with rejection sampling, so integers in any range are exactly uniform — no modulo bias. Draw single numbers, dice pools, or raw bytes as hex.

Like everything on encrypt.tools, this runs entirely in your browser — nothing you enter is transmitted or stored.

FREQUENTLY ASKED

Frequently asked questions about Random Numbers

Why not just use Math.random()?+

Math.random() is not cryptographically secure and is predictable. This tool uses crypto.getRandomValues, suitable for security-sensitive numbers.

What is rejection sampling?+

A technique that discards random values falling outside a clean range so every number in your range is exactly equally likely — no modulo bias.

Can it generate large ranges?+

Yes — any range within safe integer bounds, plus raw random bytes as hex.

RELATED INSTRUMENTS