# Shuffle lines

This tool mixes the lines order in your list using the Fisher-Yates Shuffle algorithm. As a result, you will get a new completely random order of your list.

You can automatically exclude empty lines from the list and trim spaces at the beginning and the end of each line using the appropriate checkboxes.

Just paste your list of strings or numbers into the box and click the "Mix" button. A new randomly shuffled list will appear in the adjacent field (or instead of the initial list if you have a small screen).

Press the button as much as you like, all randomizer calculations take place in your browser, not on the server.

## Randomizer algorithm

This randomizer uses the Fisher-Yates shuffle, also known as the Knuth shuffle or the Durstenfeld shuffle, a widely used algorithm for generating a random permutation of a finite sequence. This algorithm was introduced by Ronald Fisher and Frank Yates in 1938 and later popularized by Donald Knuth in his book "The Art of Computer Programming". The algorithm efficiently and uniformly shuffles the elements of an array or a list.

The Fisher-Yates shuffle works by iterating over the elements of the array from the last to the first At each iteration, it randomly selects an element from the unshuffled portion of the array and swaps it with the element at the current position. This process continues until all elements have been shuffled.

The result is a completely random list.