๐Ÿ”€ Paragraph Shuffler

Randomly shuffle the order of paragraphs separated by blank lines. Useful for reviewing document structure or randomizing order-independent quiz questions and answer choices.

How to use

  1. Enter multiple paragraphs, separated by blank lines.
  2. Press "Shuffle" to put the paragraphs in a random order.
  3. Use the copy button to copy the result to your clipboard.

How the calculation works

This tool splits the input into paragraphs at blank lines (including lines that contain only whitespace), trims each paragraph, and shuffles the order of the paragraphs. The shuffle uses the Fisherโ€“Yates algorithm: working back from the end of the list, each position is swapped with a random position at or before it, which makes every order equally likely. The random numbers come from the cryptographically secure crypto.getRandomValues, with rejection sampling to remove the slight bias that taking a remainder would otherwise introduce. With n paragraphs there are n! (n factorial) possible orders. Four paragraphs give 4 ร— 3 ร— 2 ร— 1 = 24 orders, so the chance of getting the original order back is 1 in 24.

Worked example

Input (4 paragraphs) Paragraph oneโ€ฆ Paragraph twoโ€ฆ Paragraph threeโ€ฆ Paragraph fourโ€ฆ Sample output Paragraph threeโ€ฆ Paragraph oneโ€ฆ Paragraph fourโ€ฆ Paragraph twoโ€ฆ The text inside each paragraph is unchanged; only the order of the paragraphs changes.

Things to be aware of

  • In the output, paragraphs are separated by exactly one blank line.
  • Indentation at the start of a paragraph (including full-width spaces) is removed along with other leading and trailing whitespace.
  • Useful for shuffling quiz answer options, reordering brainstorming notes, or trying out different structures for a piece of writing.

FAQ

How are paragraphs detected?

One or more blank lines are treated as a paragraph break.

What randomness does this use for shuffling?

It uses a Fisher-Yates shuffle driven by a cryptographically secure random source (the Web Crypto API's getRandomValues), producing an unbiased, fair shuffle.

Does this also shuffle the sentences within each paragraph?

No. Only the order of whole paragraphs is shuffled โ€” the text inside each paragraph is left unchanged.