Random number generator

One number, or a whole set without repeats, in any range you choose.

Set the lowest and highest value you want, then generate. Numbers come from your browser cryptographic random source, so the result is genuinely unpredictable rather than a shuffled sequence.

Try:

Runs entirely in your browser. Your text is never uploaded — open DevTools, Network tab, and you will see zero requests while you use this tool.

How to use it

  1. Type the minimum and maximum in the two boxes.
  2. Press Generate number for one value, or Generate 6 unique for a set with no repeats.
  3. Press Copy to take the result.

What this tool does

Generate number returns one whole number, including both ends of the range. A range of 1 to 6 can return 1 or 6, not just the values between them.

Generate 6 unique returns six different numbers from the range with no repeats — the lottery-style draw. If the range is too small to hold six different values, you get as many as fit.

Generate 20 numbers returns twenty values with repeats allowed, one per line, which is handy for test data or a quick simulation.

Why modulo bias matters

Most quick implementations take a random number and use the remainder to squeeze it into a range. That introduces a small but real bias: when the range does not divide evenly into the source, the first few values come up slightly more often than the last few.

This generator throws away values that fall in the uneven tail and draws again, so every number in your range is equally likely. It costs a fraction of a millisecond and removes the problem entirely. Most online generators do not bother, and for a dice roll nobody notices — for a prize draw, it is the difference between fair and nearly fair.

Examples

RangeActionTypical result
1 – 100Generate number73
1 – 49Generate 6 unique4, 11, 23, 28, 39, 45
1 – 6Generate 20 numbersa column of twenty dice rolls

When you need it

Doing it without this tool

Excel and Google Sheets. =RANDBETWEEN(1,100) gives one number; press F9 to redraw. For a set with no repeats you need a helper column of =RAND() and a sort, because RANDBETWEEN happily repeats itself.

Python. random.randint(1,100), or random.sample(range(1,50),6) for a set without repeats.

Command line. shuf -i 1-100 -n 1 on Linux and macOS.

Privacy: the numbers are generated on your device

No request is made when you press generate. The values are produced by your own browser, are not logged, and disappear when you close the tab. The page keeps working with the network switched off.

Related tools

Magic 8 ballAsk a yes or no question. The ball answers.Dice rollerRoll a d6, a d20, two d6 or percentile dice. Sums included.Group generatorPaste names, choose how many groups, get evenly sized random teams.Name pickerPaste a list, pick a winner. No account, no cloud, no limit.Binary translatorConverts text into binary code and decodes binary back into readable text.Remove accentsConverts accented letters to their plain equivalents — é becomes e, not blank.Reading timeTurns your word count into reading and speaking time at several speeds.

See all generators →

Frequently asked questions

Are both the minimum and maximum included?

Yes. A range of 1 to 6 can return 1 or 6, so it behaves like a real die rather than cutting off the top value.

Is this truly random?

It uses the browser cryptographic random source, which is designed to be unpredictable, and it removes modulo bias so every value in the range is equally likely.

Can I get the same number twice?

With Generate number, yes — each press is independent. Use Generate 6 unique when repeats are not allowed.

What is the largest range I can use?

Any whole numbers your browser can represent exactly, which is well beyond nine quadrillion. Ordinary use will never reach it.

Can I generate decimals?

Not yet — results are whole numbers. Multiply your range by ten or a hundred and divide the answer yourself if you need one or two decimal places.

Is my range or result stored?

No. Nothing is sent to a server and nothing is kept after you close the page.