Back to Tools

Shuffle Text Lines

Randomize the order of your lines

0
0
0
Input Lines

Randomize the order of any list

When you need a fair, unpredictable order, human shuffling tends to be biased. This tool takes a list with one item per line and rearranges the lines randomly. It is useful whenever the order should not depend on who wrote the list first: draw sequences, quiz questions, playlists, or a batch of test data.

How to shuffle

  1. Enter your items in the Input Lines box, one per line. You can type, use Paste, import a .txt document with File, or click Sample to load eight colors.
  2. Leave Trim lines and Skip blank ticked (both are on by default) to remove stray spaces and empty rows, or untick them to keep the text as typed.
  3. Press Shuffle Lines.
  4. Copy the result or download it with the .TXT button as shuffled-lines.txt.

Not happy with the order? Press the button again. Each click reshuffles your original input, not the previous result, so you can keep drawing new arrangements until one suits you.

How the randomness works

The tool uses a Fisher-Yates shuffle driven by the browser's Math.random function. That gives every line an equal chance of landing in any position, which is fine for classroom draws, giveaways among friends or mixing a to-do list. It is not a cryptographic generator, so do not rely on it for anything where security or auditability matters, such as regulated lotteries.

Ways people use it

  • Choosing the speaking order for a meeting or presentation day.
  • Mixing flashcards or quiz questions so they do not appear in the same sequence each time.
  • Randomizing rows of sample data before splitting it into training and test groups.
  • Creating a random playlist order from a pasted track list.

Keep in mind

  • Shuffling is at the level of whole lines. A paragraph broken across several lines will be scattered, so join wrapped text first.
  • If you leave Skip blank off, blank lines are shuffled along with everything else and may end up in the middle of your list.
  • Duplicate lines are kept as they are; the tool does not deduplicate.
  • The shuffle is not seeded, so the same input will not give a repeatable result.

The counters show characters, words and lines before and after; they should match unless trimming or blank removal changed something.




Related Tools

Related Tools


Frequently Asked Questions

Is the shuffle truly random?
It uses the Fisher-Yates algorithm with the browser's Math.random, so each ordering is equally likely for practical purposes. That is fine for casual draws and mixing lists, but it is not a cryptographically secure generator.
What happens if I click Shuffle Lines again?
The tool reshuffles the text still in the input box, not the previous output, so you get a new independent arrangement each time. Your original order is never lost as long as the input stays unchanged.
Are blank lines shuffled too?
By default they are removed, because the Skip blank checkbox is ticked. If you untick it, empty lines are treated as ordinary entries and can land anywhere in the shuffled result, including the very top.
Can I get the same shuffle twice?
No. There is no seed option, so a shuffle cannot be reproduced on demand. If you need to keep a particular arrangement, copy the result or download shuffled-lines.txt right away before shuffling again.
Does it remove duplicate lines?
No. Duplicates stay in the output and are simply moved around like any other line. Use a separate duplicate line remover first if you want each item to appear only once in the shuffled list.
Support Chat
We typically reply within minutes

Hello! 👋 Before we start, please tell us your name.