Skip to content
M2TOOLKIT

Everyday · free tool

Random Number Generator

Pick random numbers in any range — one at a time or thousands, with or without repeats.

Use it as often as you like — it's free, with no sign-up and no limits.

  • Everyday
  • Free
  • No sign-up
  • Runs in your browser
  • Updated
Press Generate to pick a number.

Uses crypto.getRandomValues with no modulo bias, so every number in the range is equally likely.

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the Random Number Generator

  1. Set the minimum and maximum.
  2. Choose how many numbers and whether repeats are allowed.
  3. Press Generate.

What does this tool do?

“No repeats” draws numbers like balls from a bag, so each can appear only once — ideal for raffles and lottery-style picks. With repeats allowed, each number is independent, like rolling a die.

How the numbers are drawn

Every number comes from your browser's cryptographic random generator (crypto.getRandomValues), with rejection sampling so that no number in the range is even slightly more likely than another. A common shortcut, taking a random number modulo the range, gives small biases; this tool avoids it.

With “No repeats” on, numbers are drawn like balls from a bag until you have as many as you asked for. With it off, each number is independent, like rolling a die again. You can generate up to 10,000 numbers at once and sort them if you like.

Settings for common jobs

A die roll: 1 to 6, one number, repeats allowed. A 6-from-49 lottery pick: 1 to 49, six numbers, no repeats, sorted. One of 13,983,816 possible tickets. A raffle with 250 numbered tickets: 1 to 250, as many winners as prizes, no repeats. If you ask for more unique numbers than the range holds (say 10 unique numbers between 1 and 5), the tool tells you instead of looping forever.

Related: Random Picker · Permutation & Combination Calculator

Why use it?

  • Raffles and prize draws.
  • Random samples for surveys and audits.
  • Games and classroom activities.

Use cases

  • Raffles, prize draws and classroom picks.
  • Dice and game numbers.
  • Random samples for audits and quality checks.
  • Test data for spreadsheets and code.

Example

6 numbers from 1 to 49 with no repeats, sorted: a typical lottery-style pick.

Common mistakes

  • Allowing repeats in a raffle, so the same ticket can win twice.
  • Re-generating until you get a result you like: decide in advance that the first draw counts.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Frequently asked questions

Is it truly random?

Results come from crypto.getRandomValues, your browser's cryptographically secure random generator, with an unbiased method of picking from a range — so every outcome is equally likely.

Can I use it for a raffle or prize draw?

It's fine for informal draws like classroom raffles or office giveaways. Regulated lotteries and some prize promotions have legal rules about how winners are drawn, so check those first.

Content last updated . See how M2Toolkit works.

Other tools people use alongside the random number generator.