Shuffle Lines

Put the lines of a list into a random order: names for a draw, questions for a quiz, songs for a playlist or rows of data for sampling. The shuffle is a Fisher-Yates shuffle driven by your browser's cryptographically secure random number generator, so every order is equally likely and nobody can predict the result.

Transform & Compare Runs in your browser

Shuffle the Lines of Your Text

How to Use the Shuffle Lines

  1. Paste your lines, one item per line (a sample list is filled in).
  2. Tick Keep the first line in place if your list has a header row.
  3. Press Shuffle. Press it again for a new order.
  4. Copy or download the shuffled list.

About This Tool

Teachers randomising quiz questions or presentation order, organisers making fair draws, and analysts randomising rows before splitting data.

Input: Plain text lines  ยท  Output: Plain text lines.

Features and Limitations

Features

  • Uses crypto.getRandomValues with rejection sampling, so there is no bias towards any position.
  • Every press gives a new independent order.
  • Optional header row that stays at the top.
  • Blank lines can be dropped before shuffling.

Limitations

  • The result is not saved or logged anywhere, so it cannot be used as evidence of a fair draw; record it yourself if that matters.
  • Lines are shuffled as whole lines; to shuffle words or characters, put each on its own line first.
  • Results are computed in your browser; nothing you enter is sent to a server.

Example

Shuffling Alice, Ben and Chloe gives one of the six possible orders, each with a probability of one in six.

Frequently Asked Questions

Is the shuffle truly random?

It uses your browser's cryptographically secure random number generator (crypto.getRandomValues) with a Fisher-Yates shuffle. Each possible order has the same chance.

Can I use it for a prize draw?

Yes, for informal draws. For regulated competitions follow the rules that apply to you, which may require a witnessed or audited method.

Why can the same order appear twice?

With a short list there are few possible orders (3 lines have only 6), so repeats are normal.

Does it keep duplicate lines?

Yes. Every line is kept exactly once in the output, including duplicates.

Related Tools

More like this: all Transform & Compare tools, all Text & Writing tools or the TinySandy home page.