Shuffle Lines

–lines dealt, Fisher-Yates fair
Blank lines stay in place while the non-empty lines deal among themselves, so stanza and section breaks survive; every ordering has equal probability, and re-shuffling never makes a line likelier to land anywhere.
The random bench: the line sorter for the opposite of a deal, the random team generator for groups instead of order, and the random word generator for one pick instead of many.

Paste your lines and shuffle: every line lands in a new, uniformly random position - the Fisher-Yates deal, the same algorithm card games and statistics trust - with blank lines left where they were so your paragraph breaks survive the trip. Re-shuffle for a fresh order, copy when it looks right.

The honest shuffle matters because the lazy one does not: sort-by-random tricks cluster lines and leave the first item too often near the top. Fisher-Yates gives every one of the n! orderings an equal chance, which is what a raffle, a presentation roster or a vocab drill actually needs. The table shows what fairness means at small sizes.

How to use

  1. Paste the lines - the shuffled order appears below with a fresh deal each time you paste or press shuffle again.
  2. Re-shuffle until the order feels right; each press is an independent fair deal, and no re-roll makes any line more likely to sit anywhere.
  3. Copy the output block; the line count matches the input, blanks included, so nothing was dropped in the wash.

Frequently asked questions

Is the shuffle fair?

Yes - it is the Fisher-Yates algorithm, which gives every ordering of your lines exactly the same probability: five lines have 120 equally likely orders, ten have 3,628,800. The tell of an unfair shuffle is clustering and position bias; this one deals each line by swapping from the end with an unchosen remainder, the construction statisticians have trusted since 1938.

What do people use line shuffling for?

Raffles and giveaway draws, randomizing study flashcard order, shuffling presentation rosters and duty rotations, mixing playlist or reading lists out of habit, and un-sorting alphabetized lists back to chaos. Anywhere 'no system, no favorites' is the requirement, a fair line shuffle is the whole answer.

Do blank lines survive?

They stay in place: the shuffle deals only the non-empty lines among themselves and leaves empty lines where they stood, so a list with stanza breaks or section separators keeps its shape. If you want the blanks gone entirely, the whitespace cleaner strips them in one pass before the deal.

Can I shuffle only part of a list?

Shuffle in batches: paste the section you want mixed, deal, then paste the result back into the larger document. The start-number trick in the line-numbering tool can renumber a section afterward, and the prefix tool can tag each block before you reassemble - the line tools compose.

Why not just sort the lines randomly in a spreadsheet?

Because the classic sort-by-hidden-random-number trick is biased: ties and sort stability pile lines back near their original order more often than chance allows. A proper Fisher-Yates deal has no ties by construction. For a raffle or a duty roster, the difference between almost fair and exactly fair is the difference between a shrug and an audit.

Related tools