Random Number Generator

Pick a random number between any two values, or a list with no repeats, free and with no sign-up. Every number in the range has exactly the same chance, using your browser's secure random generator.

Random Number Generator

Quick ranges

Press Generate or hit the space bar.

Random Number Generator by OneToAnything ↗

Embed this tool on your website

Paste this code into your class page, blog, wiki, or website builder. It works anywhere that accepts HTML or an embed code.

  • Google Sites: click Insert, then Embed, choose Embed code, paste, and press Next and Insert. Publish the site to make it live.
  • WordPress: add a Custom HTML block (type /html) and paste the code. If the tool disappears when you save, your account isn't allowed to post iframes, so ask the site's administrator.
  • Google Classroom or an app without embed code: post the link to this page instead. Everything still runs in the browser.
Preview

How to use the random number generator

  1. Enter a minimum and maximum. Both are included, so a range of 1 to 10 can return 1 or 10.
  2. Set How many if you need more than one number, and check No repeats if every number must be different.
  3. Press Generate or tap the space bar. The quick range buttons jump straight to common ranges like 1 to 10 and 1 to 100.

How the numbers are picked

Each number comes from crypto.getRandomValues, the cryptographically secure random number generator built into your browser. Converting raw random bits into a number in your range is done with rejection sampling, so every number from the minimum to the maximum has exactly the same chance of appearing. Simpler generators often skip this step, which quietly makes some numbers a little more likely than others.

With No repeats turned on, the generator draws without replacement, like pulling numbered tickets out of a hat and setting each one aside.

  • Raffles and giveaways. Number your entries, set the range, and draw. Turn on No repeats to pick first, second, and third place in one go.
  • Classrooms. Call on a student by roster number, choose a page to read, or create quick math problems.
  • Games. Stand in for a missing die with 1 to 6, decide who goes first, or play “guess my number.”
  • Sampling and testing. Choose random rows to audit, survey participants to contact, or test values for a spreadsheet.
  • Decisions. Number your options and let the draw choose. If you only have two, a coin flip does the same job.

Pick a number between two numbers

Most searches for a random number are really “pick a number between X and Y.” Type those two numbers as the minimum and maximum, leave How many at 1, and press Generate. A few examples of what the same tool covers:

You wantMinimumMaximumOther settings
One number between 1 and 10110How many: 1
Five different numbers from 1 to 50150How many: 5, No repeats
A stand-in die roll16Or use the dice roller
A random digit09Quick range 0–9
Order for 12 people112How many: 12, No repeats

For a shuffled list of names rather than numbers, the list randomizer keeps your own words, and for lottery-style picks with the right ranges, see the lottery number generator.

Sharing a preset range

You can link straight to a range by adding it to the address, for example onetoanything.com/random-number-generator/?min=1&max=500. The page opens with that range filled in, ready to generate.

Frequently asked questions

How do I pick a number between 1 and 10, or any two numbers?

Type the lowest number in Minimum and the highest in Maximum, then press Generate. Both ends are included, so 1 to 10 can give 1 or 10. The quick range buttons fill in common ranges for you.

Is this random number generator truly random?

It uses your browser’s cryptographically secure random number generator, which is seeded from unpredictable sources in your device and designed so results can’t be predicted. Technically that’s a pseudorandom generator, not a physical source like atmospheric noise, but for raffles, games, and sampling its results are indistinguishable from true randomness and free of bias.

How do I get random numbers with no repeats?

Set How many to the amount you need and check No repeats. You can generate up to 1,000 numbers at once, as long as the range contains enough whole numbers. For example, 6 numbers from 1 to 49 with no repeats.

Can I pick two or more numbers at once?

Yes. Set How many to 2, 5, 10, or up to 1,000. Check Sort results to see them in order and Copy to paste the list somewhere else.

Can I use this as a decision maker?

Yes. Give each option a number, set the range to match, and let the number decide. With three dinner ideas, number them 1, 2, and 3, and generate a number from 1 to 3. For options you’d rather type in, use the Decision Maker or the wheel spinner.

Are the minimum and maximum included?

Yes. A range of 1 to 10 can return any whole number from 1 through 10, including 1 and 10 themselves.

Can I use negative or very large numbers?

Yes. Any whole numbers between negative one quadrillion and positive one quadrillion (1,000,000,000,000,000) will work, and the minimum can be negative.

Can I use this for a raffle or giveaway?

Yes. Give each entry a number, set the range to match, and generate a winner. For several prizes, turn on No repeats so nobody wins twice. If people need to see that the draw was fair, generate the result on a shared screen or record it. The raffle generator handles names and multiple tickets for you.

What does this do that a search engine's built-in generator doesn't?

Search engines show a basic generator for a simple range. This page also generates lists of up to 1,000 numbers, can avoid repeats, sorts and copies the results, goes full screen for a classroom or meeting, and opens with a range already filled in when you share a link.