The Util Box

Random Number Generator

Free online random number generator. Generate random numbers in range. Accurate and easy to use.

Embed this tool

Copy and paste the code below into your website to embed this tool for free. An attribution link to The Util Box is required.

<iframe src="https://www.theutilbox.org/embed/random-number-generator" width="600" height="500" frameborder="0" style="border: none; max-width: 100%;" title="Free Random Number Generator tool from The Util Box"></iframe>
<!-- Free tool by The Util Box — https://www.theutilbox.org/tools/random-number-generator -->
<a href="https://www.theutilbox.org/tools/random-number-generator">Random Number Generator by The Util Box</a>

Frequently Asked Questions about Random Number Generator

Random Number Generator — Cryptographically Sourced, Not Math.random

This random number generator draws its values from crypto.getRandomValues(), the browser's cryptographic random source, rather than the predictable Math.random() that most online generators use. You set a minimum, a maximum and how many numbers you want, and the tool prints them comma-separated with a copy button and a history of your last 20 draws.

Integers are produced by mapping a random 32-bit value into your range, and every draw is independent — the same number can repeat across a batch. That is the correct behaviour for dice, raffles and sampling with replacement. If you need each value to appear only once (a lottery draw, a shuffled playlist), use the random picker or random team generator, which draw without replacement.

Whole Numbers or Decimals

Integers (default)

Both the minimum and the maximum are included, so a range of 1 to 6 behaves exactly like a die. Use it for dice rolls, draws, seat numbers, random sample indices and test data.

Decimals

Produces a uniform real number in the range, displayed to four decimal places with trailing zeroes trimmed. Useful when you need a random weight, coordinate or probability rather than a whole number.

If the maximum is not greater than the minimum, the tool deliberately produces no output — a silent guard against a range that has no valid draw.

How "Random" Is It, Really?

The underlying bits come from the operating system's CSPRNG, which is the same class of source used for cryptographic keys, so there is no repeating seed you could exploit and no pattern a human could predict. One technical caveat worth stating plainly: whole numbers are mapped into your range with a modulo operation, so if your range does not divide evenly into 2³², some values are a microscopically more likely than others — on the order of a few parts in a billion for typical ranges. That is irrelevant for a raffle or a game and is the same trade-off every simple in-browser generator makes. Decimal mode avoids the issue entirely.

Related Randomness Tools

Generation is instant and local; no numbers are requested from or sent to a server, so nothing can be logged or influenced.