Skip to content

Free tool

Random Number Generator

Set a minimum and a maximum, choose how many numbers you need, and click Generate: this tool draws the result instantly, right in your own browser. It handles single picks (a raffle winner, a dice-style roll, a coin-flip-style 1 or 2) and large batches alike, up to 1,000 numbers at once, with optional decimal places, no duplicates, and ascending or descending sorting. Every draw is powered by the Web Crypto API's cryptographically secure random number generator instead of the plain Math.random() function most free generators quietly rely on, so the numbers you get are uniformly distributed with no bias toward any value in your range, and nothing you type is ever sent to a server. If you specifically need a single number picked one at a time with a spinning-wheel animation, see the random number wheel instead; if you want the technical explanation of what "true" randomness actually means, see true random number generator.
Number type

Generated with the Web Crypto API (cryptographically secure, unbiased) in your own browser: nothing you enter is ever sent to a server.

How to use this random number generator

Three fields control every draw:

Integer vs. decimal numbers

Integer mode returns whole numbers only, which covers the vast majority of everyday uses: picking a winner, rolling a die, choosing a lucky lottery-style number, or generating sample IDs. Decimal mode returns numbers with a fractional part, useful for simulating measurements, generating realistic-looking test data (prices, sensor readings, percentages), or any exercise that specifically calls for non-whole numbers. Decimal mode lets you choose between 1 and 6 digits after the decimal point; internally, the generator scales your range by that precision and draws an unbiased integer in the scaled space before dividing back down, so the extra decimal digits are just as uniformly distributed as a plain integer draw would be.

Worked example: picking a raffle winner from 45 tickets

Set Min to 1 and Max to 45, leave How many numbers at 1, and click Generate. The single number returned corresponds to the winning ticket. If ticket numbers don't start at 1, just adjust Min and Max to match your actual numbering (for example, 100 to 145) and the draw stays exactly as fair: every ticket in the range has an identical chance of being chosen, regardless of how the range is offset.

Worked example: drawing a sample of 20 unique numbers from 1 to 500

Set Min to 1, Max to 500, How many numbers to 20, and turn on "No duplicates (unique numbers)". This is the setup for a simple random sample: 20 distinct numbers drawn from a population of 500, with no repeats and every possible group of 20 equally likely to appear. Turn on Sort (ascending) afterward if you want the sample numbers listed in order rather than in draw order, which many people find easier to cross-reference against a spreadsheet.

Worked example: a decimal number between 0 and 1

Set Min to 0, Max to 1, switch Number type to Decimal, and choose 4 decimal places. This mirrors what a programming language's default random function usually returns (a uniform value in the unit interval), which is handy for spreadsheet formulas, probability demonstrations, or seeding a manual Monte Carlo-style estimate without writing any code.

What "no duplicates" actually changes

With duplicates allowed (the default), each of the requested numbers is drawn completely independently, exactly like rolling a die multiple times: the same value can come up more than once, and in a small range with a large count it usually will. Turning on "No duplicates" instead draws a genuine sample without replacement: once a number has been picked, it's removed from the pool for the rest of that batch, so every number in the results is guaranteed distinct. This only works if the range is large enough to hold the requested count (you can't draw 10 unique numbers from a range of 5), and the tool shows a clear message rather than a wrong or partial result if you ask for more unique numbers than the range can supply.

Sorting your results

By default, results are shown in the order they were drawn. Switching Sort to Ascending or Descending re-orders the final list numerically without changing which numbers were drawn or how fair the draw was: sorting happens purely as a display step, after the random selection is already complete. This matters for lottery-style number sets, where players conventionally expect their numbers listed smallest-to-largest, and for statistics samples that are easier to scan or paste into a spreadsheet in order.

Why this generator uses the Web Crypto API instead of Math.random()

Most free random number tools on the web are built on JavaScript's built-in Math.random() function: fast, but not cryptographically secure, and prone to a subtle bias ("modulo bias") when its output is naively squeezed into an arbitrary range. This generator instead uses crypto.getRandomValues(), the Web Crypto API's cryptographically secure random number source, combined with rejection sampling (redrawing any value that would introduce bias) to guarantee every number in your chosen range has a genuinely equal chance of appearing. You can verify this yourself: it's a standard, MDN-documented browser API, not a proprietary claim. See true random number generator for a full, honest comparison between Math.random(), the Web Crypto API used here, and the hardware entropy sources (like atmospheric radio noise) that dedicated "true random" services use.

Common uses for a random number generator

The same min/max/count/unique controls cover a wide range of everyday situations:

Comparing common ways to pick a random number

This generator is one of several practical ways to get a random number, and each has a genuinely different trade-off worth knowing about:

If you just want one number, quickly

Searching for "number generator" instead of the full phrase? The number generator page is the same tool with quick-start range presets (1 to 10, 1 to 100, 1 to 1000) for a fast single pick with no setup. For a spinning-wheel style pick instead of a plain result, try the random number wheel.

Frequently asked questions

Is this random number generator really free?
Yes. Every feature (integer and decimal draws, up to 1,000 numbers at once, unique numbers, sorting, and copying the results) is free, with no account, no sign-up, and no limit on how many times you generate.
Is the result actually random, or biased toward certain numbers?
It's unbiased. The generator uses the Web Crypto API (crypto.getRandomValues) with rejection sampling, which removes the modulo bias that a naive Math.random()-based implementation can introduce. Every number in your chosen range has an equal chance of being drawn. See the true random number generator page for the full technical explanation.
Can I generate negative numbers?
Yes. Both Min and Max accept negative values, for example -50 to 50, and the draw works exactly the same way across zero.
What happens if I ask for more unique numbers than the range allows?
The tool shows a clear error message explaining that the range is too small for that many unique numbers, instead of returning a wrong or incomplete result. Widen the range, lower the count, or turn off "No duplicates" to fix it.
Does this tool store or send my numbers anywhere?
No. Every draw happens entirely in your browser using JavaScript. Nothing you enter, and nothing generated, is ever sent to a server or stored outside your own device (beyond your last settings, saved locally so the tool remembers your preferences next time).
How many numbers can I generate at once?
Up to 1,000 numbers in a single batch, with the option to require them all to be unique (no duplicates) or allow repeats.
Can I get decimal numbers instead of whole numbers?
Yes. Switch Number type to Decimal and choose between 1 and 6 decimal places; the range and duplicate/sorting options all work the same way as for integers.
How is this different from RANDOM.ORG's true random number service?
RANDOM.ORG draws from a hardware entropy source (atmospheric radio noise), the strongest randomness tier available, and is typically rate-limited per day for free use. This tool uses the Web Crypto API's cryptographically secure pseudorandom generator, a real step above a plain Math.random() implementation, with unlimited instant draws in your browser. See the true random number generator page for the full, honest three-way comparison.
Can I copy the generated numbers to use elsewhere?
Yes. Click "Copy results" after generating to copy the full list to your clipboard, ready to paste into a spreadsheet, document, or chat.

Ready to generate a number?

Cryptographically secure randomness, right in your browser.

Go to the generator

Free. No account needed.