Guide
Shuffling a list fairly: lines, words, sentences and random groups
Putting a list in random order sounds trivial, yet many quick methods are quietly unfair. Sorting by a random number, a popular trick in spreadsheets and code, makes some orders more likely than others. This tool uses the textbook method for a fair shuffle and adds the options people usually need next: a random subset, groups and keeping a header in place.
How the shuffle works
The list is shuffled with the Fisher–Yates algorithm: going from the last item to the first, each item swaps places with a randomly chosen item at or before it. Every possible order is then equally likely. The random numbers come from the Web Crypto API, the same source browsers use for security keys, rather than from a predictable formula. Press “Shuffle again” for a new order as often as you like.
Lines, words, sentences or paragraphs
Lines are the usual unit: one name, question or task per line. Words shuffles every word in the text, which makes word-order exercises and scrambled-sentence puzzles. Sentences keeps each sentence whole and reorders them, useful for “put the story back in order” activities. Paragraphs reorders blocks separated by blank lines, such as quiz questions with their answer options underneath.
Keeping a header
When the first line is a column heading or a title, turn on “Keep the first line at the top” and only the lines below it are shuffled. Empty lines are skipped by default so blank rows do not end up scattered through the result.
Random subsets
“Keep only” draws that many items from the shuffled list, which is a fair way to choose three volunteers, a sample of ten survey responses to read first, or five questions for today’s quiz from a bank of fifty. Because the list is shuffled first, each item has the same chance of being chosen.
Random groups
“Split into groups” deals the shuffled lines into the number of groups you choose, like dealing cards: the first name to group 1, the second to group 2, and so on. Group sizes differ by at most one, so 26 students in 4 groups gives groups of 7, 7, 6 and 6. Each group is headed “Group 1”, “Group 2” and so on, ready to paste into a message or project onto the board.
Private and offline-friendly
The list never leaves your browser, so class lists and staff names are not uploaded anywhere.
A worked example
Paste eight names, set “Split into groups” to 3 and press Shuffle again. The names are shuffled and dealt into Group 1 with three names, Group 2 with three and Group 3 with two. Set “Keep only” to 6 first and only six randomly chosen names are dealt, two per group. Each press of the button gives a new draw, so do it once in front of the class and copy the result.
Fairness in practice
For draws that matter, such as prizes or the order of exam presentations, shuffle in front of the people involved or share the result immediately, so nobody can suspect a reshuffle. The random generator cannot be influenced by the order you pasted the names in, so there is no advantage in being first or last on the list.
Related tools
Show a spinning wheel with the Random Name Picker, put the list back in order with Sort Text Lines, remove repeated names first with Remove Duplicate Lines, or roll for turns with the Dice Roller.
Checked against the current version of the Shuffle Text Lines on .

