Generators

Random Number Generator

The Random Number Generator produces cryptographically secure random integers within any range you set, using the browser's Web Crypto API. Rejection sampling removes modulo bias so every value is equally likely, and nothing is transmitted or stored.

Last updated · Free, no signup

Loading interactive Random Number Generator…

How does a secure random-number generator work?

A secure random-number generator draws unpredictable values from the operating system's cryptographic random source rather than Math.random. This page returns an integer between the inclusive minimum and maximum, making it suitable for draws, test values, and security-sensitive choices that require uniform selection.

The implementation reads unsigned 32-bit values through crypto.getRandomValues and uses rejection sampling to remove modulo bias. It supports integer ranges that fit the implementation's numeric constraints; it is not a source of auditable public randomness, and a high-stakes draw should also document its process and independent verification.