ToolGlobalHubGlobal • Free • No sign-up

Tool

Your random numbers—

How to use: set the range, choose how many numbers you need, then Generate. Drawn with your browser’s secure random generator — the same source this site’s Password Generator uses. Handy for raffles, giveaways, classroom picks and quick decisions; it is a fair picker, not a certified lottery system.

← All Tools Home Every tool has its own page — bookmark it and come back any time.

Related tools

Random Number Generator

The Random Number Generator produces whole numbers between a smallest and a largest value that you set. You also choose how many numbers to draw, whether repeats are allowed, and whether the results should be sorted, then click Generate Numbers.

The tool opens with a range of 1 to 100 and a count of 1. Results appear as a comma-separated list with a Copy Results button, and a short message confirms how many numbers were drawn and between which values.

How the Random Number Generator works

Each number is drawn with the browser's cryptographic random source, crypto.getRandomValues, using rejection sampling to avoid bias: random 32-bit values that fall in the incomplete final band for the requested range are discarded and redrawn, so every value in the range is equally likely. The drawn offset is then added to your smallest value.

Formula: For a range size R = max − min + 1 (when R ≤ 2^32): limit = 4,294,967,296 − (4,294,967,296 mod R); draw a random unsigned 32-bit value until it is below limit; result = min + (value mod R).
  • Set the range: Enter the Smallest number and Largest number. The defaults are 1 and 100; if you enter them the wrong way round, the tool swaps them.
  • Choose how many: Set How many numbers, from 1 up to a maximum of 1,000. A count below 1 is treated as 1 and a count above 1,000 is capped at 1,000.
  • Pick the options: Tick No repeats to draw each value at most once, and Sort results to display the numbers in ascending order.
  • Generate and copy: Click Generate Numbers to see the comma-separated list, then Copy Results if you need it elsewhere.

With No repeats ticked, the tool keeps drawing until it has the requested count of distinct values, and if you ask for more unique numbers than the range contains, it stops and explains that it cannot pick that many unique numbers from a range of that size. For range sizes above 2^32 the code falls back to Math.random. As the on-screen note states, this is a fair picker for raffles, giveaways, classroom picks and quick decisions — it is not a certified lottery system.

Worked examples

Example — a single draw from the defaults

Leave the range at 1 to 100 and the count at 1, then click Generate Numbers. The tool draws one value using min + (random value mod 100) and shows it alone, with the message 1 number between 1 and 100. The exact number differs on every click, as expected.

Example — asking for more unique numbers than the range holds

Set the range to 1 to 5, the count to 6, and tick No repeats. The range size is only 5, so the tool shows a dash and the message that it cannot pick 6 unique numbers from a range of only 5, instead of looping forever.

Random Number Generator FAQs

What random source does the generator use?

It uses crypto.getRandomValues, the browser's secure random generator — the same approach the site's Password Generator uses. Values that would bias the result are rejected and redrawn.

How many numbers can I generate at once?

Up to 1,000. The count field accepts 1 to 1,000; a larger entry is capped at 1,000 and an empty or below-1 entry is treated as 1.

What does No repeats do?

It keeps a record of values already drawn and discards duplicates, so every number in the result is different. It only works when the count fits inside the range size.

What happens if I enter the largest number first?

If the smallest value is greater than the largest, the tool swaps them automatically and generates within the corrected range, and the confirmation message shows the corrected order.

Can I use this for an official lottery or regulated draw?

No. The tool's own note describes it as a fair picker for raffles, giveaways, classroom picks and quick decisions, not a certified lottery system.

Related tools

Other quick-pick and converter tools.

Password Generator — Generate a password using the same secure random approach.

Unit Converter — Convert length, weight and temperature between common units.

Days Between Dates — Count total days, weeks and weekdays between two dates.

Converters — Browse the full Converters category on ToolGlobalHub.