Random Number Generator: the curtain opens, the balls drop
Draw 1 to 10000 numbers in any range - integers or decimals, negatives welcome, unique mode with capacity checks, three sort orders. Raffles get a big-number mode redrawn with the spacebar. Rejection sampling on a crypto source means zero modulo bias.
Quick counts:
Randomness: crypto.getRandomValues + rejection sampling, no modulo bias
HOPPER
?
Fill in the ticket on the left and hit DRAW. Big-number mode redraws on Space - ready for the projector screen.
Share these settings: …
History · last 10 draws, this device only
Nothing yet. Draw once and the parameters plus a result summary land here, so you can check what range you used last time.
Every number is generated in this device's browser - nothing uploaded, no account, zero network requests. Settings and history stay local; switching devices or clearing site data loses them. "Clear my data" in the footer wipes everything.
How to use
From settings to results in three steps.
1
Set the range and count
Both bounds accept negatives (type -10 to 10 exactly like that). Count goes from 1 to 10000 - anything more is stopped with a plain message. Decimal places run 0-6: 0 is integers, 2 fits money, 6 works for mock datasets. If you flip the bounds by accident the tool swaps them for you (or click ⇅ yourself).
2
Unique and sort, if you need them
"Unique only" is for raffles and door prizes - when the range cannot hold your count, you get a "range too small" warning up front instead of quiet duplicates. Sort is three-way: as drawn, ascending, or descending. Lottery-style picks read best in ascending.
3
Draw, then take them away
Hit DRAW (or press Enter). Copy all numbers newline-separated, download a .txt, or copy a share link that opens the exact same settings. For giveaways switch to "Big number · raffle": one huge number fills the stage, and the spacebar redraws - made for projector screens.
Facts and limits
The honest table: where the numbers come from, how many, and what gets refused.
Input
Range minimum / maximum (integers or decimals, negatives like -10 to 10 welcome), count 1-10000, decimal places 0-6, unique on/off, sort (as-drawn/ascending/descending); swapped bounds are auto-corrected; invalid characters (letters, double decimal points) are rejected before drawing
Output
N random numbers (batch: a grid of number balls plus newline-separated plain text; big-number mode: one huge digit), shown at your chosen precision without trailing-zero padding (3.50 displays as 3.5); copy and download are both newline-separated plain text
Defaults & URL
Defaults: range 1-100, count 10, 0 decimals, duplicates allowed, as-drawn; URL parameters ?min=&max=&n=&dec=&uniq=1&sort=asc reproduce the same setup (e.g. ?min=1&max=49&n=6&uniq=1&sort=asc is a lottery pick); settings and the last 10 draws live in localStorage (key y9314:random-number:v1 - not written on first load)
Processing
Generated locally in your browser (crypto.getRandomValues crypto-grade source plus rejection sampling against modulo bias); never leaves the device, no account, zero network requests; settings and history stay in local storage only
Limits
At most 10000 numbers per draw (larger requests are declined with a message); range span ≤ 10⁹ (bounds more than a billion apart are asked to tighten); history keeps only the last 10 draws
Known edges
Crypto-grade randomness is uniform and unpredictable, but it is not statistically certified randomness - no audit lab has signed off on it; unique mode requires the range's distinct values ≥ count and says so instead of returning duplicates; decimals are drawn uniformly in the integer domain then scaled, so 0 places is identical to integer mode
FAQ
Can I use this for raffles and giveaways? Is it legally notarized?
The randomness itself is up to the job: a crypto-grade random source plus rejection sampling gives every number exactly equal odds, which is more than fair enough for office parties, classroom draws, and community giveaways. What it does not have is third-party notarization - the page runs locally in your browser, so there is no way to prove to a notary that nobody touched the settings at the moment of the draw. For public commercial giveaways, record your screen (range, count, and the click itself) as evidence; for anything with legal stakes, use a notarized or regulator-approved drawing service.
How is this different from Math.random()?
Math.random() is a predictable pseudo-random generator - fine for jitter animations, wrong for raffles. Worse, taking Math.random() modulo a range introduces modulo bias: when the range does not divide evenly into the generator's output space, some numbers come up slightly more often than others. This tool uses crypto.getRandomValues (the browser's crypto-grade source) with rejection sampling: random values that fall in the uneven tail are thrown away and redrawn, so every number has exactly equal probability. You will not notice the difference day to day, but in a giveaway that difference is the whole fairness story.
Can it generate decimals? How many places?
Yes. Pick 0 to 6 decimal places: 0 means integers, 2 fits money amounts, 6 works for mock datasets. The generator draws uniformly in the integer domain first, then scales down by a power of ten - so decimals are just as uniform across the range as integers, not integers with random digits glued on.
Why does unique mode complain the range is too small?
Unique draws require the range to hold at least as many values as you asked for: 1 to 10 contains only 10 integers, so 11 unique picks is mathematically impossible. The tool checks this up front and tells you to widen the range or lower the count - it never quietly hands you duplicates. With decimals, capacity scales by 10^places (1 to 10 at 2 decimals offers 901 distinct values).
Where is the history stored? Does it pile up?
In your browser's localStorage on this device - never uploaded. Only the last 10 draws are kept, older ones get pushed out automatically, and parameters plus result summaries typically stay under 20KB total. Switch devices or clear site data and it is gone; the Clear my data link in the footer wipes it in one click, and in private browsing it vanishes when the window closes.
Does it work with negative ranges like -10 to 10?
Yes. Both bounds accept negatives - type or paste the minus sign like any other character. The tool works from the span (-10 to 10 spans 21 integers). For the [-1, 1) style ranges common in simulations, enter -1 to 0 as a close approximation.