Random Picker
Numbers, names, teams and dice, drawn fairly and repeatably if you want them checked
What to draw
Write it the usual way. 2d6 is two six sided dice,4d6kh3 rolls four and keeps the highest three, and you can add terms together: 1d8 + 2d4 - 1.
Result
Make it checkable
Leave this empty and every draw comes from the browser's cryptographic generator. Nobody can predict it, replay it, or work out what it did a minute ago, including this page.
Put anything in it and the draw becomes repeatable instead. The same seed with the same settings lands on the same answer, on any machine, forever. So you can announce the seed before the draw and let people work out the winner for themselves instead of taking your word for it. Draw again moves on to the next round of that seed, which is also repeatable.
Four things in one place: draw numbers in a range, pick winners out of a list, put people into groups, and roll dice. All of it in the browser, and all of it fair in the boring, checkable sense, and not the hand-waving one.
Why the obvious way is not fair
Pick a number 1 to 3 from a die:
roll 1, 4 -> 1
roll 2, 5 -> 2
roll 3, 6 -> 3
Even, because 6 divides by 3. Now try 1 to 4:
roll 1, 5 -> 1
roll 2, 6 -> 2
roll 3 -> 3
roll 4 -> 4
One and two come up twice as often as three
and four. Same code, different numbers.Almost every random picker on the internet does the equivalent of taking a remainder, and a remainder is only even when the range divides the source exactly. When it does not, the low end of the range comes up more often. The gap is invisible in ten draws and quite real in ten thousand.
The fix has been known since the 1950s and costs nothing: work out where the uneven tail starts, and if a value lands in it, throw it away and take another. Every draw here does that, whether it is picking a lottery number or a name off a list.
Shuffling is worse
[a, b, c].sort(() => Math.random() - 0.5)
abc 37.5% bac 12.5%
acb 6.2% bca 6.2%
cab 6.3% cba 31.3%
Six orders. Flat would be 16.7% each. The list
comes back in the order it went in more than a
third of the time. V8, ten million runs.Sorting by a random comparator is the single most common way to shuffle a list in JavaScript, and it does not produce a random order. Sorting algorithms assume the comparator is consistent, and a random one is not, so which orders come out depends on how the engine happens to sort. The numbers above are measured, not illustrative: on V8, which is what Chrome, Edge and Node all run, a three item list comes back in the order it started more than a third of the time.
This uses Fisher-Yates instead, which walks the list once from the back, swapping each item with a random one at or before it. Every possible order is equally likely and it does the whole thing in one pass.
The seed, and why you might want one
Before the draw:
"the seed is spring-giveaway-2026"
After the draw:
everyone types it in and gets the same winner
The seed does not have to be secret. It has to
be published before anybody knows what it picks.There is no way for anyone watching a giveaway to know that the winner was drawn honestly. You could have run it forty times and kept the answer you liked. Announcing the winner proves nothing, because you announce it after you know it.
A seed turns that around. The draw becomes a function of the seed and the settings, so publishing the seed first is a promise about a result you do not yet know. Anybody can type it back in afterwards and get the same answer. It is the same idea as picking a lottery number before the balls come out, and it costs you nothing but a sentence.
Pick something you obviously could not have chosen after the fact if you want it to hold up: a stock closing price, a football score, the hash of the latest bitcoin block. Draw again moves to the next round of the same seed, so a redraw is honest too, as long as you say you are doing it.
Groups come out even
Splitting eleven people into three teams cannot give three equal teams. This shuffles first and then deals the list out one at a time, so the sizes never differ by more than one, and which team gets the extra person is itself drawn. Otherwise team one would be the big one every single time, which people notice within about two rounds.
Dice notation
The notation is the one every tabletop game uses. A number, the letter d, and the number of sides: 2d6 is two six sided dice. Add or subtract terms freely, so 1d8 + 2d4 - 1 works, and so does a bared20.
kh and kl keep the highest or lowest few and drop the rest. 4d6kh3 is how character statistics get rolled, and2d20kh1 is rolling with advantage. Dropped dice are shown crossed out instead of hidden, because seeing what you did not get is half the fun.
The average shown underneath is exact for ordinary rolls. Where dice are dropped it is left out: working out the true average of "keep the highest three of four" means summing over every one of the 1,296 outcomes, and a rough guess dressed up as a figure would be worse than saying nothing.
What it will not do
There is no wheel and no drum roll. If you want a spinning animation for an audience this is the wrong tool, and that is a deliberate trade: an animation has to know the answer before it starts spinning, so it adds a layer between the draw and the result that you then have to trust.
It also will not tell you a number is due. Every draw is independent, the numbers have no memory, and a run of five heads says nothing whatsoever about the sixth toss.