Toolvito

Works on this device

List Shuffler

Paste a list with one item on each line and choose Shuffle. The tool puts the lines in a random order. Every order has the same chance. Your list stays on your device.

Enter your list

Puts the lines of your list in a random order. Use it for names, tasks, questions or any list.

List and options

One item on each line. Each line is kept exactly as you typed it.

Your list is shuffled in this browser. It is not sent to a server.

Your shuffled list will show here

Enter a list, then choose Shuffle.

How to use the list shuffler

  1. Type or paste your list. Put one item on each line. You can also open a text file from your device.
  2. Choose what to do with blank lines and with lines that are in the list more than once.
  3. Tick Number the lines when you want 1. 2. 3. in front of the items.
  4. Choose Shuffle. Choose it again for a new order.
  5. Use Copy list to paste the result somewhere else, Download list to save it as a text file, or Print.

What each option does

  • Shuffle the lines of a list gives the same lines in a new order. Each line is kept exactly as you typed it, with its spaces, capital letters and signs.
  • Blank lines are lines that are empty or hold only spaces or tabs. You can remove them, or keep them and shuffle them like other lines.
  • Lines that are in the list more than once can all stay, or only the first one can stay. Two lines are the same only when every character is the same. So Ana and ana are two different lines.
  • Shuffle a list and split it into groups shuffles first and then fills the groups in turn. You choose the number of groups or the number of items in each group.
  • Numbers from A to B in random order makes every whole number of a range once, for example 1 to 10 or 0 to 9.

How the shuffle works and what fair means

Fair means two things here. Every possible order of your list has the same chance. And a new shuffle does not depend on the shuffle before.

The tool uses a method called the Fisher-Yates shuffle. It starts at the last place of the list. It picks one place from the first place up to that place, each with the same chance, and the two lines change places. Then it does the same for the place before, and so on up to the second place.

Each pick uses random bytes from the secure generator of your browser (crypto.getRandomValues). A value that does not fit the count of places is thrown away and drawn again. A simpler way, the remainder after dividing, would make some places come up a little more often. The tool does not use it, and it never uses Math.random.

Worked examples

A list of 6 names can be put in 6 × 5 × 4 × 3 × 2 × 1 = 720 orders. Each order has a chance of 1 in 720. The order you typed is one of them, so the list can come back unchanged.

Ten names in 3 groups give groups of 4, 3 and 3. The first group gets the extra name. Ten names in groups of 4 give groups of 4, 4 and 2.

The numbers 0 to 9 in random order are ten numbers, each one once, for example 7, 2, 9, 0, 4, 1, 8, 5, 3, 6.

Limits you should know

  • A list can have up to 10,000 lines and 500,000 characters. A range of numbers can hold up to 10,000 numbers.
  • The table on the page shows the first 500 lines. The text box, the copied text and the file hold every line.
  • The tool shuffles lines. It does not shuffle the words inside a line or the letters inside a word.
  • An item must be on one line. A line break inside an item makes two items.
  • The order cannot be made again later. There is no seed number.
  • This page is not a certified or witnessed draw. For a prize draw with legal rules, use a method that the rules accept.
  • If your browser has no secure random generator, the tool stops and tells you. It does not fall back to a weaker one.

Related tools