TextArray
100% local

Random number generator

Draw random whole numbers from any range, with or without repeats.

Output

Random number generator

Pick a minimum and a maximum and get random whole numbers from that range. Both bounds are included, so a range of 1 to 6 rolls a die and 1 to 49 draws lottery numbers. Ask for one number or up to ten thousand — each one lands on its own line, ready to copy into a spreadsheet or a script.

Turn on "No repeats" when every number must be different, as in a lottery draw, a raffle, a random seating order or picking winners from numbered entries. The tool tells you if the request is impossible — asking for ten unique numbers between 1 and 5 returns a calm message rather than spinning forever. "Sort ascending" orders the result numerically, which is what you want for a draw you are going to read out loud; leave it off when the order of the draw itself matters.

If you enter the bounds the wrong way round the tool swaps them silently instead of complaining. Ranges can be enormous — up to 2^48 values wide — and the unique mode stays fast even then, because it tracks only the numbers it has drawn rather than building the whole range in memory.

Numbers come from crypto.getRandomValues with rejection sampling across the range, so every value between the bounds is exactly as likely as any other. That matters more than it sounds: naive generators skew towards the low end of a range through modulo bias, which quietly ruins a draw. Everything runs in your browser and nothing is uploaded, so results are yours alone — though for anything with legal weight, a witnessed draw beats any web page.

FAQ

Are the numbers or my ranges sent anywhere?
No. Generation happens entirely in your browser and nothing leaves your device.
Are the bounds included?
Yes. A range of 1 to 100 can produce both 1 and 100. Negative numbers and zero work too.
How is this random?
It uses crypto.getRandomValues, the browser's cryptographically secure source, with rejection sampling so no value is favoured. Math.random, which suffers from modulo bias when mapped onto a range, is not used.
Why did I get an error with "No repeats"?
The range does not hold enough distinct numbers for the count you asked for. Widen the range or lower the count.
Can I use it for a prize draw?
For informal draws, yes — enable "No repeats" and number your entries. For draws with legal or financial consequences, use a method you can audit and witness.