Shuffle lines
Randomly reorder a list of lines, using a proper unbiased shuffle.
How it works
Reorders pasted lines at random. Useful for randomising a draw order, a playlist, a question bank, or picking a winner from a list of names.
This uses a Fisher–Yates shuffle driven by the browser’s cryptographic random number generator. That matters more than it sounds: the obvious way to shuffle a list — sorting it with a random comparator — produces a measurably biased result, with some orderings far more likely than others. Fisher–Yates gives every permutation equal probability.
Because randomness is genuine, results will sometimes look unshuffled. A few items staying near their original position is expected, not a bug.
This tool runs entirely in your browser. Nothing you enter is sent to a server, logged or stored, and the page keeps working with the network disconnected.
Common questions
- Is this properly random?
- Yes. It uses a Fisher–Yates shuffle with the browser’s cryptographic random number generator, so every possible order is equally likely.
- Why did some lines barely move?
- Because the shuffle is genuinely random. Real randomness produces runs and near-misses; a result that always looks thoroughly mixed would be the suspicious one.
Related pages
- Word and character counter Words, characters, sentences, paragraphs and reading time, counted as you type.
- Typing speed test Measure words per minute and accuracy on a one, two or five minute test.
- Remove duplicate lines Strip repeated lines from a list, keeping the first occurrence of each.
- Sort lines alphabetically Sort a list of lines A–Z, Z–A, by length, or numerically.
- JSON formatter and validator Pretty-print, minify and validate JSON, with the exact position of any error.
- Text compare Compare two blocks of text and see which lines were added, removed or changed.
- Regex tester Test a regular expression against sample text, with matches and capture groups shown.
- Case converter Convert text between upper, lower, title, sentence, camel, snake, kebab and other cases.
- Remove empty lines Delete blank lines from a block of text, optionally collapsing runs to one.
- Find and replace Replace every occurrence of a string in pasted text, with optional regex.