Shuffle Lines
Paste a list with one item per line — names, quiz questions, flashcards, playlist tracks — and get the same lines back in a random order. Click Shuffle Again for a fresh order whenever you like. Free, no sign-up, and the list never leaves your browser.
Options
0 lines
How to Use the Line Shuffler
- Paste your list. One item per line, with no limit other than what your browser can hold.
- Decide about empty lines. Skip empty lines is ticked at first, so blank lines are dropped. Untick it if blank lines are part of the list and should be shuffled in with the rest.
- Click Shuffle. The shuffled list appears under Shuffled output, with a count of input and output lines. The button then reads Shuffle Again.
- Reshuffle or copy. Every click gives a new random order. Use Copy Result when you like the one you have.
How the Shuffle Works
The tool uses the Fisher-Yates shuffle, the standard unbiased method. It walks down the list from the last line to the second, swapping each line with one chosen at random from the lines at or before it. Every possible order is equally likely, which a common shortcut, sorting with a random comparison, does not guarantee.
How many orders are there? A list of n lines can be arranged in n! ways: 5 lines in 120, 10 lines in 3,628,800, 20 lines in about 2.4 × 1018. A reshuffle that happens to leave a line where it was is not a mistake; with 5 lines, a given line stays put one time in five.
An Example
Input
Alice Bob Charlie Dana Eve
One possible output
Dana Alice Eve Charlie Bob
That output is only one of the 120 equally likely results, and the next click will almost certainly give a different one. Nothing is stored and the shuffle cannot be seeded, so a result cannot be reproduced later. Copy the order you want to keep. With a blank line in the input, "Alice", "", "Bob", "Charlie", the Skip empty lines box decides whether the output has three lines or four.
Good Uses, and One Limit
- Presentation and turn order. Shuffle the class list and read it from the top.
- Quiz and exam versions. Shuffle the questions or answer options to make parallel versions of a paper.
- Random samples. Shuffle a list and take the first n lines: that is a simple random sample drawn without replacement.
- Study cards and playlists. Remove the order effect from a set you are learning.
The shuffle uses the browser's ordinary random number generator. That is right for classrooms, games and planning, but it is not a certified or auditable source. If a prize, a grade or a legal decision depends on the draw, use a method your participants can watch or verify.
Which Tool Do You Need?
| If you want… | Use |
|---|---|
| A whole list in random order | This page |
| One winner, or a few names, picked at random | Random Name Picker |
| Participants randomised into study groups, from a recorded seed | Random Assignment Generator |
| A list put in alphabetical or length order | Sort Lines Alphabetically |
| Random numbers in a range | Random Number Generator |
Frequently Asked Questions
- How do I randomize the order of a list?
- Paste the list with one item per line and click Shuffle. The same lines come back in a random order, and each further click, now labelled Shuffle Again, gives another.
- Is the shuffle truly random?
- It is statistically fair: the Fisher-Yates method makes every order equally likely. The underlying numbers come from the browser's built-in generator, which is pseudo-random. That is more than enough for everyday use, but not for anything that needs a verifiable draw.
- Can I get the same shuffle twice?
- No. There is no seed and no saved history, so each shuffle is new. Copy a result if you want to keep it.
- What does Skip empty lines do?
- When it is ticked, blank lines, including lines that hold only spaces, are removed before shuffling. When it is not, they are treated as ordinary lines and end up in random places in the output.
- How do I pick a random sample from a list?
- Shuffle the list and take the first lines. For five winners out of a class, copy the top five. Every subset of five is equally likely, and nobody can be picked twice.
- Can I shuffle words in a sentence?
- This tool shuffles whole lines. Put each word on its own line first, shuffle, and then rejoin them.
- Is my list uploaded?
- No. The list is shuffled in your browser and nothing is sent or stored.