Shuffle Text Lines
Randomize the order of your 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
- 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.
- 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.
- Press Shuffle Lines.
- 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