Skip to content
PocketDesk
Your files are processed on your device, never uploaded

Random number generator

Fair random numbers from your browser, with no repeats if you want.

  • Runs in your browser
  • No sign-up

How to generate random numbers

  1. Enter the minimum and maximum. Both numbers can be picked.
  2. Enter how many numbers you want, up to 1,000.
  3. Tick No repeats if each number may appear only once.
  4. Press Generate. Press it again for a fresh draw.

One number shows large at the top. Several numbers appear in the text box so you can copy them.

How the numbers are made

Computers usually fake randomness with a formula that repeats its pattern. This tool asks your browser for cryptographic randomness instead, the same source used for passwords. It then turns raw random bits into a number in your range with rejection sampling: values that would favor some numbers are thrown away and drawn again. The simple shortcut of taking a remainder makes small numbers slightly more likely, and this avoids it.

For No repeats, the tool shuffles the list of possible numbers and takes the first ones, so every number has the same chance in each position.

Worked example

You want six lottery-style numbers from 1 to 49, all different.

  • Minimum 1, maximum 49, count 6, No repeats on.
  • A draw might return 7, 19, 23, 31, 38, 44.
  • With repeats allowed, the chance of a repeat in six draws is about 27%, so No repeats matters here.

For a dice roll, use 1 to 6 with a count of 1. For a coin flip, use 0 and 1.

Common uses

  • Pick a raffle winner by ticket number.
  • Choose a sample from a numbered list for a survey or audit.
  • Decide turn order in a game.
  • Generate test data or sample IDs.

A note on choosing

If a draw has real money or a prize attached, say beforehand how the range and count are set. Then nobody can accuse you of changing them after you saw the result.

Pick from names instead of numbers with the random name picker. Need a quick ratio? The percentage calculator helps. For screens and pictures, try the aspect ratio calculator, and for dates, the date difference calculator.

Questions

How random are the numbers?

They come from crypto.getRandomValues, the cryptographic generator built into your browser, and are mapped to your range without bias.

How do I get numbers with no repeats?

Tick No repeats. Every number in the draw is different, like pulling tickets from a hat. You cannot ask for more numbers than the range holds.

Can I generate negative numbers or big ranges?

Yes. Both limits accept negative whole numbers, and the range can be as wide as about a quadrillion.

Is this fair enough for a prize draw?

It is statistically fair, but a public draw also needs a visible process. Record the settings and the result as proof.

Are my numbers stored or sent anywhere?

No. Everything happens in your browser and nothing is saved.

More calculators tools