Text ToolsA little help for every day

Search by name or task, such as JSON or percentage.

Text Tools

Shuffle Lines: Randomise a List

Shuffle a list into random order with a fair Fisher–Yates shuffle and secure randomness, or keep only the first few lines to draw random names or winners.

View all tools
Result

Press “Shuffle lines” to see the result.

How to use Shuffle Lines: Randomise a List

Paste one item per line and press Shuffle lines; press it again for a new order. To draw winners or pick a team, enter how many lines to keep. Blank lines and stray spaces are removed by default.

  1. Paste the listEnter names, tasks, questions or raffle entries, one per line.
  2. Set a sample size (optional)Enter a number in Keep only the first to draw that many random lines, e.g. 3 winners.
  3. ShufflePress Shuffle lines; each press gives a new random order you can copy.

How the shuffle works

The list is shuffled with the Fisher–Yates algorithm, which walks from the last line to the first and swaps each line with a randomly chosen line at or before it. Every possible order is equally likely, unlike the common trick of sorting with a random comparison function, which is biased. The random numbers come from the browser's cryptographically secure generator (crypto.getRandomValues), with rejection sampling to avoid modulo bias. Six names have 720 possible orders, and each press of the button picks one of them at random.

Drawing names and other uses

To draw winners, paste every entry and enter the number of winners in Keep only the first: because the whole list is shuffled first, every entry has the same chance of being picked. Tick Remove duplicates first if people who entered twice should only count once; matching is exact after trimming, so check spelling and capitals. Shuffling also helps with randomising quiz questions, presentation order, seating plans and test data. For draws with prize or competition rules, keep a copy of the original list and of the result.

Accuracy and data handling

Before copying the output, check names, punctuation and the intended meaning against the source text. The calculation runs in your current browser; the tool code does not send the input to a processing API.

Often Used Together

Next step

FAQ

How do I randomise a list of names?

Paste the names one per line and press Shuffle lines. The result is a random order; press the button again for a different one.

Can I pick random winners from a list?

Yes. Enter the number of winners in Keep only the first, e.g. 3, and press the button. The whole list is shuffled and the first 3 lines are kept.

Is the shuffle truly random?

It uses the browser's cryptographically secure random generator with an unbiased Fisher–Yates shuffle, so every order is equally likely. It is not a certified draw system for regulated lotteries.

Are duplicate entries removed?

Only if you tick Remove duplicates first. Matching is exact after trimming, so Alice and alice count as different entries.

More Text Tools

Related tools