How does a random name picker choose a winner?
A random name picker treats every distinct name in your list as one entry and gives each entry the same chance of being drawn. This one merges names that appear more than once, then removes each name from the pool once it's picked, so you can draw up to 20 winners without the same name coming up twice. The output lists winners in the order they were drawn.
That makes the first line of the output the first name out of the hat, which is handy when you need a ranking: first prize, second prize, and so on down the list.
Running a draw
- Paste your names into the input box, one per line. A column copied from a spreadsheet works as-is.
- Set Names to pick anywhere from 1 to 20.
- Click Generate. The winners appear in the output box.
- Click Copy to grab the result.
Every click of Generate is a fresh, independent draw. If you're running a giveaway, decide before you start that the first click counts. Clicking until you like the result turns a fair draw into a hand-picked one, and anyone watching will notice.
What counts as an entry
The picker only splits on line breaks, then tidies each line. Here is how common inputs are treated:
| What you paste | How it's treated |
|---|---|
Ben with spaces around it |
Trimmed to Ben |
| Empty lines between names | Ignored |
Ava, Ben, Cara on a single line |
One entry called Ava, Ben, Cara |
| The same name on two lines | One entry, so no extra odds |
Ava and ava |
Two entries, because the match is case-sensitive |
| 5 names with Names to pick set to 8 | All 5 names, shuffled |
| Only spaces or blank lines | No output |
The comma case catches people out most often. If your list arrived comma-separated, swap the commas for line breaks first, or the whole list becomes a single "name" that wins every time.
Merging duplicates means nobody gets an extra chance because their name was pasted twice, and a winner never appears twice in the output. For a raffle where people bought several tickets, give each ticket its own label, such as Ben #1 and Ben #2, so every ticket is a separate entry. If you want to see which names were repeated before you draw, the duplicate line remover shows the cleaned-up list.
How fair is the draw?
Picking happens with the browser's crypto.getRandomValues(), the same cryptographically secure source used for passwords and keys. Math.random() is fine for games but isn't designed for anything that needs to be unpredictable.
Turning a random number into a position in your list has a classic trap called modulo bias. Take a random byte (0 to 255) and use the remainder after dividing by 3 to choose among three names: 256 values don't split evenly into three, so the first name gets 86 chances and the other two get 85 each. The picker avoids this with rejection sampling. It draws a 32-bit number and throws it away if it falls in the uneven tail, which leaves each entry's odds equal to within about one part in four billion.
Each winner is then removed and the next is drawn from whoever is left. With n distinct entries and k winners, every entry ends up with a k/n chance of being among the winners:
| Entries | Winners drawn | Chance any one entry wins |
|---|---|---|
| 10 | 1 | 10% |
| 30 | 3 | 10% |
| 50 | 5 | 10% |
| 120 | 20 | about 16.7% |
Limits worth knowing
- No history. The tool doesn't keep a record of past draws. If a giveaway needs proof, screen-record the draw or run it in front of the participants.
- No weighting option. Repeated names are merged, so weight entries by giving each ticket a distinct label, as described above.
- Up to 20 winners per draw. To put a whole list in random order, for example a presentation running order, use the text line shuffler instead.
- Names stay on your device. Nothing is sent to a server, so a list of students or customers never leaves the browser tab.
Need numbered tickets instead of names? The random integer generator draws numbers from a range, and the text sorter can alphabetise the winners afterwards if you'd rather announce them A to Z.
Last updated