Skip to content
ToolPlankDEV
Text Tools
100% In-Browser Execution

Updated:

Randomize Lines in a List

Paste a list to randomize lines in one step. Without a seed, every order is equally likely, because the shuffle uses your browser's secure random numbers. Pick a few random lines, drop blanks and duplicates, or add a seed to repeat an order. Nothing is uploaded.

Options:

Lines to pick is only used when Mode is set to Pick random lines.

Your list

Input
0 chars · 0 lines

Shuffled list

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use Shuffle Lines

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste your list

    Put one item per line in the Your list box, press Paste, or drop a .txt file onto it. Press Sample to load a list of names.

  2. 02

    Choose shuffle or pick

    Shuffle all lines puts every line in a random order. Pick random lines keeps only the number you type in Lines to pick.

  3. 03

    Set the list options

    Ignore blank lines is on by default. Trim lines and Remove duplicates clean the list before it is shuffled.

  4. 04

    Shuffle again or copy

    Press Shuffle again for a new order. Press Copy or Download to keep the result.

Randomize Lines with a Fair Shuffle

This tool randomizes lines using the Fisher-Yates shuffle. With Seed left empty, the random numbers come from the browser's secure source (crypto.getRandomValues) and are drawn with rejection sampling, so there is no modulo bias and every order of the list is equally likely. Without a seed you get a new order every time you press Shuffle again or change the list.

That fairness holds for the unseeded shuffle only. A seeded order is meant to be repeatable, not to be a fair draw, and the next section explains why.

Shuffle Text Line by Line

The unit of the shuffle is the line. Each line moves as a whole, and the characters inside a line are never mixed. With the sample list of eight names, Alice to Hana, there are 40,320 possible orders. This is useful for a speaking order, a quiz question list, a playlist, test data or a reading list. If you want a text shuffle that mixes words or letters inside a line, this tool does not do that.

The options that clean the list run first. Ignore blank lines drops empty lines and lines with only spaces. Trim lines removes spaces at both ends of each line. Remove duplicates keeps one copy of each line, and matching is exact, so Apple and apple count as different lines.

Pick a Few Random Lines

Set Mode to Pick random lines and type a number in Lines to pick. The tool shuffles the list and keeps the first lines, so each line can be picked once at most. If the list is shorter than the number, every line is returned in random order. A number that is not a whole number of 1 or more gives an error message instead of a guess.

Repeat the Same Order with a Seed

Type any word in Seed to get the same order every time for the same list and settings. With the seed team-a, the sample list comes out as:

Text
Emma
Daniel
Chloe
George
Alice
Farah
Hana
Ben

With the seed team-b, the same list comes out in a different order:

Text
Ben
Daniel
Emma
Farah
Hana
Alice
Chloe
George

In Pick random lines mode with three lines and the seed team-a, you get Emma, Daniel and Chloe, the first three of the first order above.

Clean the List Before You Shuffle

To sort the list instead of shuffling it, use Sort Lines. To remove repeats with more options, use Remove Duplicate Lines, and to drop blank lines on their own, use Remove Empty Lines. After shuffling, Add Text to Each Line can number the lines or add a prefix, and List to Comma Separated can join the result into one line.

Limits and Privacy

The output always uses LF line endings. The tool handles up to 2,000,000 characters. If a browser has no secure random source, the unseeded shuffle shows a message instead of using a weaker one. The shuffle runs in your browser and your list is not uploaded. See the Privacy Policy.

Frequently Asked Questions

Technical Q&A for Shuffle Lines

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the list with one item per line. The shuffled list appears at once. Press Shuffle again for another order.

Yes, when Seed is empty. It uses the Fisher-Yates shuffle with the browser's secure random numbers and rejection sampling, so every order is equally likely. A seeded order is for repeatability and is not a fair draw.

Yes. Set Mode to Pick random lines and type how many lines you want in Lines to pick.

Yes. Type a seed. The same list, settings and seed always give the same order. Do not use a seed when the order must stay secret.

A line shuffler moves whole lines and keeps each line intact. This tool is a line shuffler. It does not mix the letters or words inside a line.

Blank lines are ignored by default. Remove duplicates is off by default and keeps one copy of each exact line when you turn it on.

Yes, for choosing lines from a list you provide. Paste your lines and use Pick random lines. It does not invent new lines.

No. The shuffle runs in your browser and the list stays on your device.