About the Shuffle Lines
This tool puts the lines of your list into a random order using a Fisher-Yates shuffle driven by the browser's secure random source, which gives every ordering an equal chance, unlike naive shuffles that are subtly biased. It is useful for randomising a play order, a question set, a rota, or the order of names.
Fisher-Yates walks backwards through the list, swapping each item with one chosen at random from the positions at or before it, and that is precisely what makes all n factorial orderings equally likely. The shortcut people reach for instead, sorting with a comparator that returns a random number, is not equivalent. Its result depends on which sorting algorithm the engine uses and leaves items biased towards where they started, a flaw that is easy to miss because the output still looks thoroughly jumbled.
Every line is kept, including blank ones, so the line count never changes; only the order does. A practical use is randomising interview questions or survey options so the sequence itself does not skew the answers, and rotating a rota so the same person is not permanently first. To pick a few items instead of reordering all of them, use the Random Picker; to put the list back into a defined order afterwards, the Sort Lines tool.
How to use
- Paste your list, one item per line.
- Press Shuffle.
- Copy the randomised order.
Common questions
- Is the shuffle fair?
- Yes, it uses a Fisher-Yates shuffle with a secure random source, so every ordering is equally likely.
- Are any lines lost?
- No. Every line is kept; only the order changes.
- How do I pick just a few?
- Use the Random Picker to select a number of items at random.