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.
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.
- Paste the listEnter names, tasks, questions or raffle entries, one per line.
- Set a sample size (optional)Enter a number in Keep only the first to draw that many random lines, e.g. 3 winners.
- 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.
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 toolsWrap each line in quotes, tags or text and join it all into one list.
Replace words or patterns in text, with regex and whole-word options.
Turn HTML into tidy Markdown with tables, lists, links and code.
Align Markdown table columns and turn spreadsheet data into tables.
Find, dedupe and sort the email addresses hidden in any text.
Get a clean, deduplicated list of the links in any text, HTML or log