Random Number Generator
Draw numbers from any range, all different if you need them to be, or roll dice.
Runs entirely in your browser
Loading the tool…
—
Set a range, say how many you want, and press the button. The numbers are drawn here in the page, using the generator your browser gets from the operating system, which is the same source a password manager draws on.
That matters more than it sounds. Most pages that do this use the language's ordinary random function, which is fast, seeded from something predictable, and fine for shuffling a slideshow. If the draw decides a prize, an order or who goes first, you want the other one, and this uses the other one.
Tick all different for a draw with no repeats, which is what you need for a raffle, for picking teams, or for lottery numbers. Ask for as many as ten thousand at once, sort them if a list is easier to read than a scatter, and copy the lot in one go.
The dice box takes the notation people already write: 2d6,
d20, 4d6+3. It shows each die as well as the total, since
the interesting part of rolling four dice is usually which four they were.
Picking a name rather than a number is what the Wheel of Names is for, and it spins while it decides. For identifiers rather than draws, see the UUID generator.
How to use it
- Set the lowest and highest number, and how many you want.
- Tick 'all different' if none of them may repeat.
- Generate, and copy the list.
Questions
Is this really random?
It is as random as your machine can manage. The draw uses crypto.getRandomValues, the browser's cryptographic generator, which is seeded by the operating system from physical sources. It is not Math.random, which is a fast arithmetic generator that should not decide anything that matters.
Are the numbers fair across the whole range?
Yes, deliberately. Turning random bytes into a range by taking a remainder quietly favours the low end whenever the range does not divide evenly, which is the most common bug in generators like this one. This draws again instead of folding the leftover values back in, so every number in the range is equally likely.
Can I stop numbers repeating?
Tick 'all different'. Asking for more numbers than the range contains is refused with an explanation rather than looping forever: there are only six numbers between 1 and 6, so seven of them cannot all be different.
What can I use this for?
Raffles and giveaways, picking teams or an order to present in, lottery numbers, sampling rows to check, choosing a test case, or settling an argument. Anything where you would otherwise write numbers on paper and pull one out of a hat.
How do I write the dice?
The usual way: 2d6 is two six-sided dice, d20 is one twenty-sided die, and 4d6+3 adds three to the total. Spaces and capitals do not matter. Up to a thousand dice at a time, which is more than any table needs.
Is anything sent anywhere?
No. The randomness comes from your own machine and the arithmetic runs as WebAssembly in this page. Nothing in the page sends what you draw anywhere, so it works with the connection off.
Can I get the same numbers again?
No, and that is on purpose. There is no seed to set, because a generator you can replay is not one you should use for a draw. Copy the numbers if you need to keep them.
Your data stays on your device
Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. You can load this page once, go offline, and it still works.
The page does load ads, which is how it is paid for, and that script is the only thing here that fetches anything. It sees that the page was opened. It does not see what you type or the file you chose, because neither ever leaves this tab.