Random Number Generator

Generate a truly random integer within any minimum and maximum range you specify. Useful for games, giveaways, statistical sampling, making decisions, or any situation where you need an unbiased random number.

How to use the Random Number Generator

Enter a minimum value and a maximum value, then press Generate. A random integer in that range (inclusive of both endpoints) appears immediately. Press Generate again for a new number without changing the range.

How random numbers are generated

This generator uses the browser's crypto.getRandomValues() API to produce cryptographically uniform random bytes. Those bytes are mapped to an integer in your specified range using a rejection-sampling method that eliminates modulo bias — a common flaw in simpler implementations that makes some numbers slightly more likely than others. The result is a uniformly distributed integer: every number in your range has exactly the same probability of being selected.

Related tools