Random Number Generator

Random number generator

Generate random numbers your way — by range or by digit count, with decimals, in bulk, and optionally with no duplicates.

▌ Result

Two ways to generate

Choose By range to get numbers between a minimum and maximum — perfect for raffles, sampling, picking a winner, or simulating a roll — or By digits to get numbers with an exact length, handy for codes, PINs and test IDs. Set how many you need and how many decimal places to include, from whole integers to precise fractions.

The numbers use your browser's secure random generator, which gives every value in your range an equal chance — important when fairness matters, like choosing a giveaway winner or drawing a sample. Everything runs locally, so nothing about your draw is sent anywhere.

When you'd reach for it

A quick random number settles more than games: pick a raffle entry by row number, choose a random record to spot-check, assign people to groups, generate placeholder IDs for testing, or just break a tie. Having control over the exact range and count makes it more flexible than rolling dice when you need a specific span. For dice notation specifically, the dice roller is purpose-built, and for random people the name generator fills out test data.

Secure randomness, and why it matters here

Every number comes from crypto.getRandomValues(), the browser's cryptographically secure random number generator, which draws on operating-system entropy. The more common Math.random() is a fast pseudo-random generator: fine for shuffling a carousel, unsuitable when the result must be unpredictable.

The distinction matters whenever someone has an incentive to guess. A prize draw, a random audit sample, a tie-breaker — all are weaker if the sequence can be reconstructed. A CSPRNG is designed so that seeing previous outputs gives no useful information about the next one.

Ranges, digits and duplicates

  • By range is inclusive at both ends, so 1 to 100 can return 1 and can return 100. To pick a winner from 250 entries, generate one number in 1–250 and count down the list.
  • By digits is not the same as a range. A 6-digit value is padded to keep its length, so it can begin with a zero — which is what you want for a code or a PIN, and not what you want for a numeric ID a spreadsheet will strip leading zeros from.
  • Decimal places apply to range mode. Zero gives whole integers; raising it gives fractions, useful for seeding test data or sampling a continuous variable.

Generating several numbers draws each independently, so duplicates are possible and expected. If you need distinct values — a raffle drawing five different winners — generate more than you need and discard repeats, or draw one at a time and re-run after removing each winner.

When not to use a general-purpose generator

For passwords, use a dedicated tool. Numbers alone have far less entropy per character than a mixed alphabet, and the password generator handles character sets and length properly. For unique identifiers, a UUID is the right shape — it is designed so that independently generated values essentially never collide, which random numbers in a small range certainly do.

One more caution for anything auditable. Because the generator is not seeded by you, results are not reproducible: you cannot re-run a draw and get the same numbers. For a prize draw where fairness might be questioned later, record the results as they are generated, ideally witnessed, rather than assuming you can regenerate them.

FAQ

Can I generate numbers with decimals?
Yes — set the 'Decimals' field to the number of decimal places you want, and each number is generated with that precision.
How do I get numbers with a specific number of digits?
Switch Mode to 'By digits' and set the digit count — for example, 6 digits gives numbers from 100000 to 999999.
Are the numbers truly random?
They use crypto.getRandomValues, the browser's cryptographically secure generator — far stronger than ordinary pseudo-random functions.
Can the same number appear twice?
Yes. Each number is drawn independently, so duplicates are possible and entirely normal — especially over a small range. If you need distinct values, generate more than you need and discard repeats, or draw one at a time and remove each winner before the next draw.
Is this random enough to pick a competition winner?
Yes. It uses the browser's cryptographically secure random generator rather than the ordinary pseudo-random one, so results cannot be predicted from earlier outputs. Note that draws are not reproducible, so record the result when you generate it.
Should I use this to generate a password?
No — use the password generator instead. Digits alone carry far less entropy per character than a mixed alphabet, so a numeric string needs to be much longer to offer the same protection.

Related tools