What the random choice generator does
It picks one or more items from a list you give it, with every item equally likely. Use it to choose a raffle winner, decide who presents first, settle where to eat, split people into an order, or pick a question from a bank. It can also shuffle the whole list into a random order.
The list never leaves your device. The picking happens in your browser, and nothing is stored once you close the page.
How to use it
- Type or paste your items into Your options, one per line. A single line split by commas works too, such as
Red, Green, Blue. - Set How many to pick. Keep it at 1 for a single winner.
- Leave No repeats on if an item should not be picked twice. Turn it off to pick with replacement, like drawing a ball and putting it back.
- Choose how to Separate results with. The default is a new line.
- Press Pick at random. Or press Shuffle list to put every option in a random order.
A single pick is shown in large type under Result. Several picks appear as a list. Press Copy to copy them. The last ten draws are listed under Recent results with the time of each, which helps if someone asks to see an earlier draw. Press Clear to empty it. The list is kept only until you leave the page.
Blank lines and extra spaces around each item are ignored, so you can paste straight from a spreadsheet column.
Examples
These are real outputs from the code that runs this page. Each run is different.
| List | Settings | One run gave |
|---|---|---|
| Pizza, Sushi, Tacos, Curry, Burgers, Salad | Pick 1 | Sushi |
| Same list | Pick 3, No repeats | Burgers, Sushi, Curry |
| Ana, Ben, Chloe, Dev | Pick 2, No repeats | Ben, Chloe |
| Pizza, Sushi, Tacos, Curry, Burgers, Salad | Shuffle list | Sushi, Curry, Burgers, Tacos, Pizza, Salad |
| Heads, Tails | Pick 5, No repeats off | Heads, Tails, Tails, Tails, Tails |
| Yes, No | Pick 1 | Yes |
The coin row is a good reminder of how randomness looks. Four tails in a row feels suspicious, but short streaks like that are normal in fair random draws.
How it works
Each line becomes one entry in a list. To pick one entry, the tool draws a random whole number from 0 up to the last position in the list and returns that entry.
The random number comes from crypto.getRandomValues, the secure random source built into browsers. To turn raw random bits into a position without favouring any entry, the tool uses rejection sampling. A plain remainder calculation would give some positions a slightly higher chance whenever the list length does not divide the random range evenly. Rejection sampling throws away the few draws that would cause that tilt and draws again, so every entry has exactly the same chance.
With No repeats on, the tool runs a Fisher-Yates shuffle on a copy of your list and takes the first items. That is the same as drawing names from a hat without putting them back. Shuffle list returns the whole shuffled list.
Ideas for using it
- Giveaways. Paste the entrant names, pick one winner, then pick two more as reserves.
- Classrooms. Choose who answers next, or shuffle the class list to set a presentation order.
- Teams. Shuffle the list, then split it into the first half and the second half.
- Decisions. Paste the options you are stuck between and let the tool choose. If you feel let down by the result, that tells you what you wanted.
- Study. Paste a list of topics or flashcard prompts and pick three to revise.
Tips and limits
- Duplicates count twice. Every line is an entry, so a repeated name has a higher chance. Clean the list first if that is not what you want.
- Commas inside items. If your items contain commas, put them on separate lines. The comma split only applies when the whole list is on one line.
- Picking more than you have. With No repeats on, asking for 10 picks from 6 options returns all 6 in random order, and the status line tells you only 6 could be picked.
- Keep a record. For a public giveaway, copy the result and note the time from Recent results, or record your screen while you press the button.
- Up to 1,000 picks per press.
Other ways to pick at random
Excel or Google Sheets. With names in A2:A20, =INDEX(A2:A20, RANDBETWEEN(1, ROWS(A2:A20))) picks one name. In current Excel, =SORTBY(A2:A20, RANDARRAY(ROWS(A2:A20))) shuffles the list.
Python. random.choice(names) picks one, random.sample(names, 3) picks three without repeats, and random.shuffle(names) shuffles in place. Use secrets.choice(names) when the pick must be unpredictable.
Command line. On Linux, shuf -n 1 names.txt prints one random line from a file.
Related tools
To pick numbers rather than items, use the random number generator. For a random letter, for example to start a word game, try the random letter generator. To pick a month for a game or a schedule, use the random month generator.