Deciding the order of team presentations, assigning reviewers to applications, picking three prize winners from a list of entrants or mixing up quiz questions all come down to the same task: putting a list in a random order. It sounds trivial, yet it is easy to get subtly wrong, and when people are affected by the outcome, "random" needs to be genuinely fair and easy to explain.
This guide explains what a fair shuffle is, the common methods that are quietly biased, how to shuffle or draw from a list in seconds, and how to do the same in a spreadsheet or on the command line.
What makes a shuffle fair?
A shuffle is fair when every possible ordering is equally likely. For a list of 8 names there are 8 × 7 × 6 × … × 1 = 40,320 possible orders, and a fair method must be equally likely to produce each one. A consequence is that each name has the same chance of landing in any given position, including first.
Drawing winners is a special case. Picking 3 winners from 50 entries fairly means every group of 3 has the same chance of being chosen. Shuffling the whole list fairly and taking the first 3 achieves exactly that.
The Fisher-Yates shuffle
The standard algorithm is the Fisher-Yates shuffle (also called the Knuth shuffle). It works like drawing names from a hat:
- Start at the last position of the list.
- Pick a random position from the start up to and including the current one.
- Swap the two items.
- Move one position towards the start and repeat until you reach the first item.
Each step chooses uniformly among the items not yet placed, which is why every ordering is equally likely.
Methods that look random but are not
- Sorting with a random comparison. A popular programming shortcut sorts a list using a comparator that randomly returns "bigger" or "smaller". Depending on the sort algorithm, some orders become noticeably more likely than others.
- Swapping each item with any random position. A small change to Fisher-Yates, choosing from the whole list at every step, produces a biased result.
- Modulo bias. Turning a random number into a position with
random % nslightly favours smaller positions unless the random range divides evenly byn. It is tiny for small lists, but a careful tool avoids it with rejection sampling. - Human "randomness". People asked to pick randomly tend to avoid the first and last items and repeat patterns. Picking by hand is not random.
Where the randomness comes from
Browsers offer two sources: Math.random(), a fast general-purpose generator, and the Web Crypto API (crypto.getRandomValues), which is designed to be unpredictable enough for security use. For a classroom game either is fine; for a prize draw, using the cryptographic source removes any argument that the outcome could be predicted.
Shuffle a list or draw winners in your browser
Our List Randomizer uses a Fisher-Yates shuffle driven by your browser's cryptographic random generator, with rejection sampling to avoid modulo bias.
- Open List Randomizer and paste one item per line into Your list (one item per line). Click Sample to try it with example names.
- To shuffle the whole list, leave Pick how many (0 = all) at 0. To draw winners, enter the number you need, such as 3.
- Keep Ignore empty lines on so blank lines are not treated as entries.
- Turn on Remove duplicates first if someone might appear twice and each person should have exactly one chance. Leave it off if duplicate entries are deliberate, such as extra tickets.
- Turn on Number the result to get
1. 2. 3.in front of each item, which is handy for running orders and rankings. - Click Shuffle again for a new random order. Copy or download the result from Randomized list.
The summary tells you either how many items were shuffled or, for a draw, how many were picked out of the total.
Other ways to randomise a list
Excel and Google Sheets
The classic spreadsheet method is to add a helper column of random numbers and sort by it:
- Put your items in column A.
- In B2 enter
=RAND()and fill down. - Sort both columns by column B.
In Excel 365, a single formula does it: =SORTBY(A2:A51, RANDARRAY(ROWS(A2:A51))). Google Sheets also has a Randomize range option in the Data menu for a selected range. Note that RAND() recalculates whenever the sheet changes, so copy and paste the result as values if you need it to stay fixed.
Spreadsheets are the better choice when each item has several columns of data (a name, an email and a team) that must move together.
Command line
On Linux, shuf names.txt shuffles lines and shuf -n 3 names.txt draws three. On macOS, shuf is available through GNU coreutils. It is ideal for scripts and large files.
Wheels and pickers
For a live audience, a visual spinner is more engaging. Spin the Wheel and the Random Name Picker show the draw happening, while Team Generator splits a list into balanced groups rather than a single order.
Tips for fair draws
Clean the list first
Near-duplicates like Priya Shah and priya shah defeat a simple duplicate check. Normalise capitalisation and trim spaces, or use Remove Duplicate Lines with case-insensitive matching before you draw.
Decide the rules before you draw
Agree in advance how many winners there are, whether reserves are drawn, and whether duplicates count. Drawing again because you did not like the result defeats the purpose of randomness.
Keep a record
For anything with stakes, record the input list and the result. Take a screenshot or download the output immediately, because each press of Shuffle again produces a new order that cannot be reproduced.
Random is not balanced
A fair shuffle can still put three people from the same department next to each other. If you need balance, such as mixed teams, use a method designed for that rather than rerolling until it looks right.
Frequently asked questions
Is an online list randomizer truly random?
A well-built one uses a proper shuffle algorithm and a strong random source. Ours uses Fisher-Yates with the browser's cryptographic generator, so every order is equally likely and unpredictable.
How do I pick random winners from a list?
Enter the number of winners in Pick how many. The tool shuffles the full list fairly and returns the first N items, which gives every entrant an equal chance.
Can the same name be picked twice?
Not within one draw. Each line is used at most once. If a name appears on two lines, it has two chances unless you turn on Remove duplicates first.
How do I randomise a list in Excel?
Add a column with =RAND(), fill it down and sort by that column. In Excel 365, =SORTBY(range, RANDARRAY(ROWS(range))) does it in one formula.
Why did I get a different result when I shuffled again?
Every shuffle is independent. The tool does not use a fixed seed, so the same list produces a new random order each time, which is how a fair shuffle should behave.