Shuffle the lines of a text
Paste text with one item per line, such as a list of names, a set of questions or the rows of a data file, and the lines come back in random order. Lines are separated by line breaks, so this works on any text and on files from any system.
Keep the first line in place
Files such as CSV exports start with a header row. Tick Keep the first line in place and the header stays at the top while all the other lines are shuffled below it.
Name,Score Name,Score
Anna,91 Dev,66
Ben,78 -> Anna,91
Cara,85 Eli,92
Dev,66 Cara,85
Shuffle each block separately
If your text has groups of lines separated by a blank line, such as sets of questions with their answers, tick Shuffle each block separately. The lines are shuffled inside each block, the blocks stay in their original order, and the blank lines between them are kept.
Options
- Trim spaces: removes spaces at the start and end of each line.
- Remove empty lines: drops blank lines before shuffling.
- Remove duplicate lines: keeps the first copy of a repeated line.
Good to know
The shuffle is fair: every order is equally likely, using the Fisher-Yates algorithm with the browser secure random number generator. Nothing is uploaded, because the work is done in your browser.
To put lines in order instead, use sort lines. To count them, use the line counter. For lists split by commas or spaces, use shuffle list.