Skip to content
1001 Tools
sr
Generators

Random Number Generator

Set a low and a high bound, choose how many numbers you want, and press Generate. Draw a single number for a quick decision or a batch of unique numbers for a raffle. Everything is computed in your browser using the built-in cryptographic random source — no server, no logging.

Set a range and press Generate.

How it works

Each number is an integer drawn uniformly from your range, so every value between the minimum and maximum (both included) has the same chance. A range of 1 to 6 behaves like a die; 1 to 49 like a lottery pick.

When you ask for several numbers you can allow or forbid repeats. With repeats off, the draw is “without replacement” — like pulling numbered balls out of a bag, each value can appear at most once, so it needs at least as many values in the range as numbers requested.

The randomness comes from the browser’s crypto.getRandomValues, the same unpredictable source used for security keys — far better than the simple Math.random used by most novelty generators. You can also sort the result ascending or descending without changing which numbers were drawn.

Practical examples

Pick a winner from 240 entries

Set the range to 1–240 and count to 1. Number your entrants in a spreadsheet, generate one number, and that row wins. For three prizes, set count to 3 and turn off repeats so nobody wins twice.

A lottery-style line (6 of 39)

Range 1–39, count 6, repeats off, sorted ascending. You get six distinct numbers like 4, 11, 18, 23, 30, 37 — a valid ticket line every time, with no duplicates to cross out.

Random seating or team order

For 12 people, range 1–12 with repeats off gives each person a unique position. Ascending sort is pointless here — leave sorting off to keep the shuffled order.

Frequently asked questions

Is the result actually random?

It uses crypto.getRandomValues, the browser’s cryptographically secure generator. For everyday draws, giveaways and games it is effectively unpredictable. It is not a certified randomness service, so do not use it where gambling regulators require an audited RNG.

Are both the minimum and maximum included?

Yes. A range of 1 to 6 can return 1, 6 or anything between; a range of 0 to 9 includes both 0 and 9. The count of possible outcomes is max − min + 1.

What does “no repeats” mean?

It draws without replacement, so each number appears at most once — useful for raffles, seating and lottery lines. If you ask for more unique numbers than the range can supply (say 10 numbers from 1–5), the tool tells you instead of looping forever.

Can I use negative numbers or zero?

Yes. The bounds can be negative, zero or positive as long as the maximum is not below the minimum — for example −10 to 10 works fine.

How many numbers can I generate at once?

Up to 1000 per draw. That covers raffles and sampling; for larger datasets a spreadsheet or script is the better tool.

Does sorting change the odds?

No. Sorting only reorders the numbers already drawn for readability — the selection itself is unaffected. Turn sorting off when the order matters, such as picking a running order.

Why not just use Math.random?

Math.random is fine for animations but is not designed to be unpredictable and can be biased when mapped to a range. This tool uses the crypto source and maps it carefully, so a small range like 1–6 stays evenly distributed.

Can two people generating at the same time get the same numbers?

Effectively no. Each draw pulls fresh entropy from your own device, so two independent draws are astronomically unlikely to match unless the range is tiny.

Is anything I generate saved or sent anywhere?

No. The numbers exist only on your screen. Reload the page and they are gone; nothing is uploaded, logged or shared.

How do I use it for a coin flip or dice roll?

A range of 1–2 mimics a coin and 1–6 a single die, but the dedicated Dice Roller and Coin Flip tools show pips and faces and keep a running tally — handier for games.

Related tools