FreeKitOnline

Shuffle Lines

Randomize the order of lines.

About this tool

The short answer

Lines are reordered uniformly at random, so every ordering is equally likely. The shuffle is unbiased only if the source is a proper random generator — this one uses the browser's cryptographic random source.

What it depends on

Shuffling changes the list in place, so keep the original if order matters. Small samples can still look patterned to the eye; that is a property of small samples, not a broken shuffle.

Where this stops being useful

It shuffles lines as whole units. To randomise the order of words within a line, split first.

A shuffle-lines tool randomly reorders the lines of your text using a fair Fisher–Yates shuffle. It is useful for creating quiz orders, sampling a list, or just mixing items without bias.

How it works: lines are split, shuffled in place with a cryptographically strong random source, and rejoined. It runs locally in your browser, so your list never leaves the device.

Who uses it: teachers making randomized quizzes, researchers drawing samples, and writers breaking the order of a brainstorm. Combine it with remove-empty-lines first if your list has gaps.

Because the shuffle is random, re-running it gives a different order each time — that is expected. For a stable sort, use sort-lines instead.

This utility is one of many in a privacy-first toolbox focused on original, helpful tools that rank and pass review.

Shuffling is used for draws, random selection, and reordering without any pattern to the result. The implementation here uses the Fisher-Yates algorithm, which produces a genuinely uniform distribution across all permutations. That matters more than it sounds: the naive approach of swapping each item with a random partner does produce a shuffle that looks right, but it is biased and some orderings occur more often than others.

With a handful of items the difference is invisible. With a large list the bias compounds, and a biased draw is the kind of error that is very hard to notice and very annoying to explain to someone who expected a fair result.

Trailing empty lines are worth checking before shuffling. Pasting from a document often leaves a blank line at the end, and it will be shuffled into the middle of your list rather than staying at the end where it belonged. Removing empty lines first avoids that.

Sorting the result before use defeats the purpose, and if you find yourself wanting to do it, the tool you actually want is sort-lines rather than shuffle-lines.

For anything where fairness is externally visible, such as a prize draw among entries, check whether the rules require a verifiable method. A random shuffle in a browser is fine for personal use but is not evidence of fairness, since the source can be modified.

A uniform shuffle means every possible ordering is equally likely, which is a stronger claim than looks random. The standard algorithm achieves it by walking the list backwards and swapping each element with one at or before its position — anything that swaps with a random element anywhere in the list produces a biased result. The tool uses the browser's cryptographic random source, which is more than adequate for anything short of a certified draw.

Seeding matters when the shuffle needs to be reproducible. A fixed seed lets two people verify they got the same order, which is what makes a raffle auditable after the fact. Without a seed, the order exists only in the tab that produced it.

Common uses: randomising quiz order so memorised position does not help, sampling a subset from a long list, and breaking ties in a tournament bracket. In the last case, shuffle the entrants first and then pair them off in order — that gives every entrant an equal chance of every slot.

Frequently asked questions

Is Shuffle Lines free?
Yes. Shuffle Lines on FreeKitOnline is free, needs no sign-up, and runs entirely in your browser — nothing you type is uploaded to a server.
What does Shuffle Lines do?
Free online line shuffler. Randomly reorder lines of text for sampling or quizzes.
Is my data private when I use Shuffle Lines?
Yes. Shuffle Lines processes everything locally in your browser. We do not receive, store or log what you enter.

Every tool on this site is computed entirely in your browser — nothing you type is uploaded to a server. The information on each page is general information only and is not medical advice.