Random Number Generator

Whole numbers within any range, one at a time or in bulk

Range

Single result

—

Batch generate

Nothing here is ever sent anywhere — every number is generated locally using the browser's cryptographic random number generator.

About this tool

This generates whole numbers uniformly at random within whatever min/max range you set, using the Web Crypto API's random number generator rather than a weaker pseudo-random source, so every integer in range has an equal chance of appearing. It's useful for picking a raffle or lottery-style number, rolling a custom-sided die, sampling a random index, or generating test data. Grab a single number instantly, or produce a whole batch at once — optionally with duplicates excluded, as long as the range is large enough to hold that many unique values.

Are the min and max values themselves included in the possible results?

Yes — the range is inclusive on both ends, so setting min to 1 and max to 6 can produce 1 or 6 just as easily as any number in between, the same way a six-sided die works.

What happens if I ask for more unique numbers than fit in the range?

With "no duplicates" turned on, the batch size is automatically capped at the number of distinct values available in your range — for example, a range of 1 to 10 can produce at most 10 unique numbers, no matter how large a batch you request.

Does this generate decimal numbers, or only whole numbers?

Only whole numbers (integers) — every result is a round number between your min and max, with no fractional or decimal component.