Skip to content

Random List Shuffler - Fisher-Yates List Randomizer

Randomize any list of names, teams, or tasks online with the Fisher-Yates shuffle algorithm, which gives every possible order an equal chance of appearing.

Random List Shuffler

Enter items to shuffle, one per line. Empty lines will be automatically removed.

Loading calculator...
📚

Documentation

What is a random list shuffler?

A random list shuffler is a tool that takes a list of items and puts them back in a new, random order. Type in names, tasks, or anything else, one per line, and the tool rearranges them so every possible order has an equal chance of coming up. This tool uses the Fisher–Yates shuffle, a well-known algorithm for producing unbiased random orders.

How to use the random list shuffler

  1. Type or paste the list into the box, one item per line.
  2. Click "Randomize List." The items rearrange instantly.
  3. Read the shuffled list below the button, numbered in its new order.
  4. Click "Randomize List" again for a new, independent shuffle.
  5. Click "Copy Result" to copy the new order, or "Clear" to start over.

Blank lines in the input are removed automatically, so extra line breaks will not create empty entries in the results.

How does the Fisher-Yates shuffle algorithm work?

The Fisher–Yates shuffle goes through the list once, starting at the last item and working toward the front. At each step it picks one item at random from the part of the list not yet placed, and swaps it into the current position.

Fisher-Yates shuffle formula

For a list of n items, numbered from position 0 to position n − 1:

1for i from n − 1 down to 1:
2    choose a random whole number j, where 0 ≤ j ≤ i
3    swap the items at positions i and j
4

The loop runs n − 1 times, so the shuffle takes about n steps in total. That is called linear time, written O(n). Because the algorithm considers every position exactly once and draws from a shrinking, well-defined pool of items, each of the n! (n factorial: n × (n − 1) × ... × 1) possible orderings has an equal chance of being the result.

Example: shuffling a four-item list

Start with four items in positions 0 to 3: Apple, Banana, Cherry, Date.

  • i = 3: the random pick is j = 0. Swap positions 3 and 0 → Date, Banana, Cherry, Apple
  • i = 2: the random pick is j = 2. Swapping a position with itself changes nothing → Date, Banana, Cherry, Apple
  • i = 1: the random pick is j = 0. Swap positions 1 and 0 → Banana, Date, Cherry, Apple

Final order: Banana, Date, Cherry, Apple.

With four items there are 4! = 24 possible orders. Each one, including this one, has a 1-in-24 chance of coming up on any given shuffle.

Why not just swap random pairs?

A simpler-looking method — pick two random positions and swap them, repeated several times — looks random but is not. Some early shuffling programs from the 1950s worked this way, and they quietly favored certain orders over others, even though no single run looked suspicious. The Fisher–Yates shuffle avoids this because each item is moved exactly once, into a position drawn from a precisely shrinking set of choices, which is what makes every final order equally likely.

Where does the Fisher-Yates shuffle come from?

Statisticians Ronald Fisher and Frank Yates described the method in 1938 in a book of statistical tables, for shuffling by hand when designing experiments. In 1964, Richard Durstenfeld adapted it for computers so a list could be reordered in place, without needing a second list to track what was left. Donald Knuth included this computer version in his 1969 book The Art of Computer Programming, which is why it is sometimes called the Knuth shuffle. Web browsers use the same algorithm today.

Common uses for a list shuffler

  • Setting the order in which students present or answer questions in class
  • Seeding a tournament bracket or setting turn order in a game
  • Splitting a group into random teams
  • Picking a restaurant, movie, or task from a shortlist without favoring one choice

A plain shuffle is not always the right fit. If some items need to appear more often than others, weighted selection is a better match. If every category needs guaranteed representation, stratified sampling works better than a single random shuffle.

Frequently asked questions

Is the shuffle truly random?

It relies on the web browser's pseudorandom number generator (PRNG), a formula that produces sequences of numbers that behave like randomness for practical purposes. That is good enough for classroom orders, tournament seeding, or picking a movie. It is not designed for cryptography, gambling systems, or anything where money or security depends on unpredictability; those need certified random number generators.

Does the tool send my list to a server?

The shuffle itself runs entirely in the browser using JavaScript, so no network request is needed to reorder the list. The current list is also written into the page's web address, so a reload or bookmark does not lose it. If that address is copied, shared, or reopened, the list travels with it, including to whatever server later loads that page. Avoid putting sensitive information in the list if this matters.

What happens to duplicate items?

Duplicates are kept. If "Sam" appears twice in the input, it will still appear twice in the shuffled output, possibly in different positions.

Is there a limit to how many items I can shuffle?

No limit is built into the tool. Because the shuffle runs in linear time, even long lists reorder in a fraction of a second on any modern device.

How is shuffling different from sorting?

Sorting arranges items by a fixed rule, such as alphabetical order, and always produces the same result for the same input. Shuffling arranges items randomly and produces a different order almost every time, even with identical input.

Can I shuffle the same list more than once?

Yes. Each click of "Randomize List" runs the algorithm again, independently of any earlier shuffle. With a small list, a repeated order is possible by chance; with a larger list, it becomes extremely unlikely.