Shuffle lines, words or sentences into a random order

Paste a list or a passage, choose whether to shuffle lines, words or sentences, and press Shuffle to get a fair random order.

Live demo · real result from this tool
Shuffle

Your result appears here.

Processed on your device — nothing is uploaded.

How to use the Text Randomizer

  1. Paste your text into Your text. The sample holds five names, one per line.
  2. Choose what to Shuffle: Lines, Words or Sentences.
  3. Press Shuffle. The result appears under the heading “Shuffled (uniform Fisher–Yates)”.
  4. Press Shuffle again for a new order, and copy the one you want.

What it does and when to use it

The tool reorders pieces of text without changing the pieces themselves. Each mode suits different work:

  • Lines is for lists: names for a presentation order, quiz questions, playlist tracks, team rotas or survey answer options. Put one item per line.
  • Words mixes the words inside each line. Teachers use it to make “put the sentence in order” exercises; writers use it to break habits and find new phrasing.
  • Sentences mixes whole sentences, which is useful for sequencing worksheets or for testing whether a paragraph’s order really matters.

To pick one winner rather than order a whole list, the Random Name Picker is a better fit. To sort into a fixed order instead, use the Text Sorter. Clean the list with Remove Empty Lines first, because blank lines are shuffled like any other line.

How it works

The text is first cut into pieces:

  • Lines: split at every line break.
  • Words: each line is split at runs of spaces and tabs, separately for each line.
  • Sentences: split at . ! ? or … followed by a space. Common abbreviations such as “Dr.” and “e.g.”, initials and decimals are recognised, so “Dr. Smith” is not cut in two.

The pieces are then shuffled with Fisher–Yates: starting from the last piece, each one swaps places with a randomly chosen piece at or before it. Each random choice comes from crypto.getRandomValues and avoids modulo bias, so all orders have the same chance. The shuffle happens in your browser.

Worked examples

Words stay on their own line. “alpha” on line 1 and “beta” on line 2, in Words mode, always gives alpha then beta. Each line holds one word, and words never move between lines.

A small list. The sample list Alice, Bob, Charlie, Diana, Ethan in Lines mode can come out in any of 120 orders (5 × 4 × 3 × 2 × 1), each equally likely.

Nothing to shuffle. If the box holds only spaces, the tool shows Type or paste text above to see the result. instead of an empty output.

Limits and tips

  • Sentence detection uses an English abbreviation list; rare abbreviations can still cause a wrong split.
  • Spacing inside a line is reduced to single spaces in Words mode.
  • For a draw that others must trust, agree the list before shuffling and keep the first result.

Frequently asked questions

Is the shuffle fair?
Yes. It uses the Fisher–Yates method with random numbers from crypto.getRandomValues, your browser's cryptographic source, so every possible order is equally likely. The same order can still come up twice by chance.
Why did my lines stay in place when I chose Words?
Words are shuffled within each line, not across the whole text. The line order stays the same. A line with one word on it therefore never changes.
What happens to my paragraphs in Sentences mode?
All sentences from all paragraphs go into one pool and come out as a single paragraph, joined by spaces. Shuffle each paragraph on its own if you need to keep them apart.
Does punctuation move with the words?
Yes. In Words mode a word keeps whatever is attached to it, so "end." stays "end." wherever it lands. Remove punctuation first if you want clean words.
Can I get the same shuffle again later?
No. There is no seed, so each press of Shuffle is a new, independent order. Copy the result if you need to keep it.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close