Shuffle lines
Put a list in a random order you can reproduce later.
Every line is its own item; blank lines are dropped rather than shuffled into the result. The same seed always produces the same order, so you can note it down and reproduce a draw later — or hand it to someone who wants to check it. Shuffle again picks a new one. Up to 200,000 characters.
Result
Start typing and the result appears here. No button needed.
Shuffle lines, without the extra steps.
Put a pasted list into a random order using a Fisher-Yates shuffle, where every possible order is equally likely. The seed is shown, so the same seed always produces the same order — you can note it down, reproduce the draw later, or hand it to someone who wants to check that the result was not arranged.
How to use this tool
- 1Paste your list with one item per line, or separate multi-line items with a blank line.
- 2Choose whether a line or a whole paragraph is one item. The order appears immediately.
- 3Select Shuffle again for a different order, or type a seed to reproduce one; then copy the result.
When Shuffle lines is the right tool
- Speaking slots at a meetup have to be assigned in an order nobody can claim was arranged in advance.
- A set of quiz questions, each several lines long, needs a new order without the answers separating from their questions.
- Reviewers are being allocated to submissions, and the allocation may have to be reproduced and shown to someone later.
- A playlist or a reading list has gone stale in its original order and simply needs mixing up.
A random order you can prove
Random is only useful here if it can be checked. Every shuffle is driven by a seed that is shown next to the result, and the same seed with the same list always produces the same order. Note the seed alongside the outcome and anyone can reproduce it, which turns "we shuffled the list" into something demonstrable rather than something to be taken on trust. Shuffle again simply picks a new seed, and typing an old one back recovers exactly the order it produced.
Fisher-Yates, not sort-by-random
The familiar one-line trick of sorting with a random comparator does not produce a fair shuffle. It hands the sort algorithm an inconsistent comparison, so some orderings come up far more often than others, and how badly depends on the browser's sort implementation. This walks the list from the end, swapping each item with a uniformly chosen earlier one, which is the Fisher-Yates algorithm and gives every possible ordering the same probability.
What counts as one item is your decision
In Each line mode every line moves independently, which is right for a list of names or tasks, and blank lines are dropped rather than being shuffled into the output as gaps. In Whole paragraphs mode a blank line marks the boundary between items, so a question with its answers, an address, or a paragraph of prose is moved as a block and comes back intact with a blank line between items. Choosing the wrong one is visible immediately in the result, not after you paste it somewhere.
A few quick answers.
It selects which random order you get. The same seed with the same list always produces the same order, so a draw can be repeated and checked afterwards instead of being taken on trust. Shuffle again picks a new seed; typing an old one back reproduces exactly what it produced before.
It uses the Fisher-Yates algorithm, which produces every possible ordering with equal probability. The common shortcut of sorting by a random comparator does not — it favours some orderings, and how badly depends on the sort implementation. That is why this does the swap loop rather than a one-line sort.
Choose Whole paragraphs and separate the items with a blank line. Each block moves as a unit, so a quiz question with its answers, or an address spanning several lines, stays intact. In Each line mode every line moves independently, which is what you want for a plain list of names.
You can shuffle the list and take the first entry, and the seed lets you show how it was done. Be aware the randomness comes from a seeded arithmetic generator rather than the cryptographic source, which is the right trade for reproducibility but is not appropriate where money or a legal obligation depends on the draw.
With a short list, an order close to the original — or exactly it — is an ordinary outcome; with five items the original order comes up once in every hundred and twenty shuffles. The workspace says so when it happens, precisely because it looks like a fault. Shuffle again gives you a different draw.
Yes. Every non-blank line is an item, including repeated ones, so a list of ten entries comes back as ten entries in a new order. Nothing is deduplicated or sorted — if you want the duplicates gone first, remove them before shuffling and the count in the summary will confirm what was shuffled.