How to Generate Random Numbers for Any Purpose
Asked to think of a number between one and ten, people say seven far more often than chance allows. Asked for a number between one and a hundred, they avoid round numbers and the ends of the range. Human choices are patterned, which is exactly what random is not. The Random Number Generator produces one or several within a range you set.
Decide three things first
The range, and whether the ends are included. One to ten usually means ten possible values including both ends. Software often means otherwise, and the difference shows up as a value that never appears.
Whether repeats are allowed. Picking a winner from a list of fifty and picking three winners are different problems. If the same number must not come up twice, you need numbers drawn without replacement rather than three independent picks - otherwise the same person can win twice.
How many you need. Generating ten at once and generating one ten times are the same thing statistically, and not the same thing practically when you need to be seen to do it once.
Random does not mean evenly spread
This is the part that causes arguments. In twenty rolls of a die, some faces will appear three times and some not at all, and that is what randomness looks like - not three or four of each. A sequence that is suspiciously even is evidence of something other than chance.
So a run of the same number is not a fault. People query it constantly, and the honest answer is that genuine randomness produces streaks, and a generator that avoided them would be the broken one.
When browser randomness is good enough, and when it is not
For a prize draw, a sample, a dice roll or picking a name, the randomness your browser provides is entirely adequate.
For anything where someone has an incentive to predict the outcome, it is not. Ordinary random number generation is designed to be fast and statistically well behaved, not unpredictable to an attacker - given enough output, its future values can be computed. That matters for passwords, tokens and keys, which need cryptographic randomness. The Password Generator uses the browser's cryptographic source for exactly this reason.
If the draw has real value attached, there is a second problem a generator cannot solve: nobody can verify afterwards that you did not re-roll. For that you want witnesses or a published method, and the Wheel of Names at least makes the draw visible as it happens.
Common questions
Can I get the same number twice?
Yes, if repeats are allowed - and that is correct behaviour, not a bug.
Is it truly random?
It is pseudorandom: produced by an algorithm, statistically indistinguishable from random for ordinary purposes, and not suitable for secrets.
How do I pick a winner fairly?
Number the entries, generate one number, and decide beforehand what happens if it lands on an ineligible entry.
Is anything sent to a server?
No. The numbers are generated in your browser.
Need a number you did not choose yourself?