Skip to content
GivenTool

Random number generator

Uniform random integers in any range from crypto.getRandomValues, one or many, with or without repeats.

Settings
Runs in your browser. Nothing you type is sent anywhere.

Set a minimum and a maximum and the tool draws integers from that range, inclusive at both ends, using crypto.getRandomValues. Values are taken from 32-bit words with rejection sampling, so every integer in the range is equally likely, unlike the common Math.random() × range shortcut, which is slightly biased and not cryptographically random.

Turn on "No repeats" to draw without replacement, the way a raffle or a lottery works: 6 unique numbers from 1 to 49, or 10 winners from 250 entries. The tool checks that the range is large enough for the count you ask for. "Sort ascending" is handy for lottery-style lists; leave it off when the draw order matters.

Up to 1,000 numbers can be generated at once and copied or downloaded, one per line or separated by commas or spaces, ready for a spreadsheet.

How to use it

  1. Enter the minimum and maximum (both included).
  2. Enter how many numbers you need.
  3. Turn on "No repeats" for a draw without replacement, and "Sort" if you want them in order.
  4. Copy the list or download it as a text file.

Frequently asked questions

Is this random enough for a prize draw?

It uses the operating system's cryptographic random source through the browser, which is far better than a spreadsheet RAND() call. For legally regulated draws, check what your jurisdiction requires (often a witnessed process), but the numbers themselves are unbiased.

Why is there a limit of one billion?

Keeping the range within ±1,000,000,000 lets every draw come from a single 32-bit random word without floating-point rounding. Larger ranges are rarely needed for picking numbers.

Can it generate decimals?

No; integers only. For a decimal with two places, generate an integer in a range 100 times larger and divide by 100.

How does "no repeats" work for a huge range?

For ranges up to 100,000 values it shuffles part of the range (a partial Fisher-Yates shuffle). For larger ranges it draws and discards duplicates, which is fast because the range is much bigger than the count.