Generate a number
About this generator
This tool generates a random whole number directly inside your
browser. Unlike many simple generators that rely on traditional
Math.random(), this page uses the
Web Crypto API which provides cryptographically
secure random values.
The randomness comes from your operating system's entropy pool and
is generated using crypto.getRandomValues(). This means
the numbers are produced using the same secure randomness sources
used in security, cryptography and secure tokens.
How the random range works
The generator calculates a random value within your requested range using a technique called rejection sampling. This ensures that every possible number between the minimum and maximum has exactly the same probability.
Some simple generators use modulo arithmetic which can introduce small statistical bias. This page avoids that issue by discarding values that would produce uneven distributions.
The result is a uniform random number that is safe for games, testing, simulations and many other situations where unbiased random values are important.
Example ranges
You can specify the range directly in the URL:
?1-10 -> random number from 1 to 10
?10-100 -> random number from 10 to 100
?1000-5000 -> random number from 1000 to 5000