GENERATOR

List Randomizer

Paste a list, one item per line, and shuffle it into a fair random order or pick a few items at random. Nothing leaves your browser.


    

Your list and settings are saved in this browser on this device only. Nothing is uploaded.

About this tool

This list randomizer shuffles any list into a fair random order. Paste items one per line and click Shuffle list. Every possible order is equally likely, because the tool uses a Fisher-Yates shuffle driven by your browser's cryptographic random number generator. You can also keep only the first few items to pick a random subset, clean up duplicates, blank lines and old numbering, and export the result as text or CSV. The list never leaves your device.

How to use the list randomizer

  1. Paste your list with one item per line. Items can be names, tasks, songs, questions or anything else, and they can contain spaces and punctuation.
  2. Choose the cleanup options. Remove blank lines and Remove existing numbers and bullets are on by default, so a list copied from a document, such as 1. Ava or • Ben, is shuffled as plain items. Tick Remove duplicates if each item should appear only once.
  3. To pick a random subset, enter a number in Keep. With 3, you get 3 different items in random order, drawn without replacement. Leave it blank to shuffle the whole list.
  4. Click Shuffle list. Re-shuffle draws a completely new order each time.
  5. Save the result. Copy puts the list on your clipboard as numbered or plain text. Download .txt saves the same text, and Download CSV saves a two-column file with the position and the item.

How the shuffle works: Fisher-Yates

The Fisher-Yates shuffle walks from the last position of the list to the first. At each position it picks one of the items not yet placed, uniformly at random, and swaps it into that position. For a list of n items the last position has n candidates, the next has n − 1, and so on down to 2. Each complete run therefore makes one of n × (n − 1) × … × 2 = n! equally likely sequences of choices, and every sequence produces a different order. So each of the n! possible orders has probability exactly 1/n!.

The random numbers come from crypto.getRandomValues(), which returns cryptographically strong random values, instead of Math.random(). To turn a 32-bit random number into a choice among k items, the tool uses rejection sampling: it throws away the few values at the very top of the 32-bit range that would make some choices slightly more likely than others, and draws again. This is the same engine as the Random Team Generator.

Picking a subset uses the same shuffle and keeps the first N items. Because the shuffled order is uniform, every set of N items, and every order of those N items, is equally likely, and no item can be picked twice.

Why sort(() => Math.random() - 0.5) is not fair

A common one-line shuffle in JavaScript is list.sort(() => Math.random() - 0.5). It looks random but it is biased. A sorting algorithm expects its comparison to give consistent answers, and a coin flip on every comparison breaks that. The algorithm stops after a fixed pattern of comparisons, so each order's probability is a sum of fractions with powers of 2 in the denominator. A uniform shuffle of 3 items needs a probability of 1/6 for each order, which no such sum can produce exactly, so this method can never be perfectly fair once a list has 3 or more items.

The size of the bias is easy to measure. We shuffled the 5-item list A, B, C, D, E one million times with each method in Node.js 22 (the V8 engine used by Chrome) and counted where each item landed. A fair shuffle puts each item in each position 20% of the time.

Measured over 1,000,000 shuffles of 5 itemssort with Math.random() - 0.5Fisher-Yates (this tool)Perfectly fair
A stays in first place32.3%20.0%20%
B stays in second place32.6%20.0%20%
B ends in last place7.1%20.0%20%
Least likely item and position7.1%19.9%20%
Most likely of the 120 orders9.4%0.87%0.83%
Least likely of the 120 orders0.19%0.80%0.83%

With the sort trick, the first item stays first about 32% of the time instead of 20%, and the most common order turns up about 50 times as often as the rarest. The exact pattern depends on the sorting algorithm inside each browser engine, so other browsers give different numbers, and the figures move slightly from run to run, but the Fisher-Yates column stays within sampling noise of 20%.

Worked example

The sample list has 10 names, Ava to Jada. Clicking Shuffle list gives one of 10! = 3,628,800 possible orders, and the status line reads Shuffled 10 items. Each name has a 1 in 10 chance of landing in any given position, so Ava comes first in about 10% of shuffles. Enter 3 in Keep and the tool returns 3 different names. There are 10 × 9 × 8 = 720 possible ordered results and 120 possible groups of three, each equally likely.

Add a line 2. ben to the list and tick Remove duplicates. The numbering is removed first, then ben matches Ben regardless of case and is dropped, so you still get 10 items and the status line notes 1 duplicate removed. The first spelling is the one kept.

Uses for a random list

Common mistakes

To put a list back in order, use the Text Sorter, and to clean a list without shuffling it, use the Duplicate Remover.

Frequently asked questions

How do I randomize a list in Excel or Google Sheets?

Add a helper column next to your list, fill it with =RAND(), then sort both columns by the helper column. A quicker route is to paste the column into this tool, shuffle it, and paste the randomized list back, or download the CSV and open it in your spreadsheet. The CSV keeps one item per row with its new position.

Can I pick random winners from a list of names?

Yes. Paste the entrants one per line, tick Remove duplicates so nobody gets extra entries, enter the number of winners in Keep and click Shuffle list. The first name is the first winner. Each name can appear only once in the result, so the same person cannot win twice.

Is the list randomizer truly random?

It uses the cryptographically strong random number generator built into your browser, through crypto.getRandomValues, and a Fisher-Yates shuffle that makes every order equally likely. Unlike Math.random, this source is designed so that earlier results do not help predict later ones, and in our tests positions came out evenly spread.

How many items can I shuffle?

Up to 50,000 lines. Shuffling even the largest list takes a fraction of a second because Fisher-Yates makes a single pass. Very long results are easier to handle with Download .txt or Download CSV than by scrolling the output box.

Does it save my list?

The list and your settings are kept in local storage in this browser, so they are still there when you come back on the same device. Nothing is sent to a server. Private windows, clearing site data, or the Reset to sample list button remove the saved list.

Can I shuffle a list with blank lines kept in place?

Untick Remove blank lines and each blank line becomes an item, so it is shuffled along with everything else and can land anywhere. Blank lines cannot stay fixed while the rest moves. To keep sections separate, shuffle each section on its own.