Generators

Random Number Generator

Generate random whole numbers in any range — set a minimum, maximum and count, with options for unique (no repeats) and sorted results.

  • Free forever
  • No sign-up
  • Runs in your browser
Share X LinkedIn

Minimum

Maximum

How many numbers

Options

Results
Press Generate to draw your numbers

What is a random number generator?

A random number generator picks whole numbers at random from a range you choose. It's the digital version of rolling dice, drawing tickets from a hat or spinning a wheel — handy for games and giveaways, for choosing a random row in a list, for sampling data, for classroom activities, or any time you just need an impartial pick. This one lets you set the range, the quantity, and two useful behaviours: unique (no repeats) and sorted output.

How it works

When you press Generate, the tool asks your browser for random values and maps each one onto your range so that every value from the minimum to the maximum is equally likely. Both ends are inclusive, so a range of 1–6 behaves exactly like a six-sided die.

  • Without unique, each number is drawn independently, so the same value can appear more than once — like rolling the same die repeatedly.
  • With unique, the tool takes values without replacement: it builds the pool of possible numbers, shuffles it, and hands you as many distinct values as you asked for. That's why it can tell you up front when your count is larger than the range allows.
  • Sort results simply orders the finished draw from smallest to largest; leave it off to keep the natural draw order.

Everything happens the moment you click, using your browser's Math.random() — nothing is pre-computed on a server.

How to use it

  1. Enter the minimum and maximum — both are included in the range.
  2. Set how many numbers you want (up to 1000).
  3. Toggle Unique (no repeats) and Sort results to taste.
  4. Press Generate. The numbers appear as pills, plus a plain comma-separated line underneath.
  5. Use Copy to grab that comma-separated line, or Clear to reset everything and start over.

A worked example

Suppose you're running a giveaway with 200 entries and need to pick 5 distinct winners. Set the minimum to 1, the maximum to 200, the count to 5, and turn on Unique. Press Generate and you might get:

14, 87, 122, 158, 193

Because unique is on, no ticket number can win twice. Turn on Sort and the same draw comes back in order, which is easier to read out loud. Ask for 250 unique numbers from that same 1–200 range, though, and the tool will politely tell you only 200 unique values exist — a nudge to widen the range or lower the count.

Random vs. cryptographic

The numbers here are pseudo-random: excellent for fairness in games, draws, sampling and teaching, but not meant for security. If you're generating something that must resist guessing — a password, an API key, a session token — you want a cryptographic source instead. For those, reach for the Password Generator or the UUID Generator, which use the browser's secure crypto API. To turn a result into a different base, the Number Base Converter pairs nicely with this tool.

Private by design

All generation runs in your browser with plain JavaScript. Your range, your options and the numbers you draw are never uploaded, stored or shared — they stay entirely on your device. Discover more generators and number tools on the all tools page.

Frequently asked questions

Comet's got your back

Stuck on something? Every tool has a short guide and FAQ — and Comet can point you to the right spot.

Visit help centre