Shuffle Lines Online · Free List Shuffler | DedupeLines
DedupeLines
Free · No signup Browser-local · zero upload · fair Fisher-Yates

Shuffle lines, online

Paste any list, get the lines back in random order. Unlike the home-page dedupe with its shuffle toggle, this tool keeps every line — no deduping, no dropping — just a fair Fisher-Yates reshuffle each time you run it.

Input · 0 lines
output · 0 lines
Paste something on the left — results stream in here.

Or press Ctrl+Enter

Input lines 0
Blank lines 0
Output lines0

When to use this tool

guide
01 / Raffles & lotteries

Paste the participant list, shuffle, take whoever lands on top. No spreadsheet macros, no third-party app collecting names.

02 / Random sampling

Shuffle a list of records and pick the first N to get an unbiased sample for QA, surveys, or training-data splits.

03 / ML data prep

Shuffle line-oriented datasets before splitting into train/validation/test, so adjacent rows in the source file do not skew the split.

04 / Survey randomization

Randomize the order of survey questions or answer options between respondents to neutralize order bias.

How it works

three steps
  1. 01

    Paste your list

    Any line-oriented text: participants, items, survey questions, data rows.

  2. 02

    Optional: toggle trim or empty-line removal

    Both off by default — the shuffler preserves every input row in some random order. Turn them on if you want the shuffler to clean the input first.

  3. 03

    Hit Run, hit Run again

    Every click produces a fresh random order. No duplication, no dropping — just a permutation of your input.

Under the hood

engine notes
Algorithm
Fisher-Yates (Knuth shuffle) · in place

Each line ends in any position with probability exactly 1/n (n = number of lines). No bias from naïve sort-by-random-key shuffles.

Throughput
50K lines shuffled in ≈80 ms on a 2024 M3 MacBook Air

O(n) single pass. Random source is the browser's Math.random — fine for raffles, surveys, and ML splits; not cryptographic.

Threading
Web Worker for files ≥ 2 MB or ≥ 100K lines

Same Worker pattern as the other tools; shuffle is one branch inside the shared engine.

Privacy & limits

what stays where

Everything runs in your browser. Your list is never uploaded — no server can see who you shuffled in your raffle. 80 MB hard cap per run.

Frequently asked

answered

Is the shuffle truly random?

It uses the Fisher-Yates algorithm with the browser's Math.random as the entropy source. Every permutation of your input is equally likely. Caveat: Math.random is not cryptographically secure — fine for raffles, surveys, ML data splits, and most use cases; not appropriate for picking regulated lottery winners.

Why does pressing Run twice give a different order?

That's the design — every click reseeds and reshuffles. Refresh-resistant: the seed comes from Math.random, not from your input, so identical input doesn't produce identical output.

Does it drop or duplicate any lines?

No. The shuffler is a pure permutation: every input line appears exactly once in the output, in a different position. If you want dedupe + shuffle in one pass, use the homepage tool and turn on the shuffle toggle.

How is this different from `sort -R` or `shuf`?

Same outcome — Fisher-Yates with a non-cryptographic RNG. `sort -R` and `shuf` are the command-line equivalents; this tool is for people who paste from the clipboard instead of piping files. No `sort` quirks like locale-dependent comparisons get in the way.