Three ways to split the text
Line mode is the common one. The input is split on newlines, the entries are shuffled, and they are joined back with newlines. That is what you want for a list of names, a set of questions, a group of URLs, or anything else where one item occupies one line.
Word mode splits on any run of whitespace and rejoins with single spaces, which is useful for scrambling a sentence into a word jumble or generating a randomized order for a vocabulary exercise. Note that it discards the original spacing entirely, so indentation and line structure do not survive word mode.
Sentence mode splits on sentence-ending punctuation, keeping the punctuation attached to the sentence it belongs to, then rejoins with spaces. It is a reasonable heuristic rather than a linguistic parser, so abbreviations, decimal numbers, and ellipses can split in places you did not intend. Check the output when the text contains any of those.
- Line mode splits on newlines and rejoins with newlines
- Word mode splits on whitespace and collapses all spacing to single spaces
- Sentence mode uses punctuation, so abbreviations can split incorrectly
How the shuffle works, and how random it is
The shuffle is Fisher-Yates, walking the list from the end and swapping each item with a randomly chosen item at or before it. That algorithm is unbiased: every possible ordering is equally likely. It is worth naming because the obvious alternative, sorting with a comparator that returns a random value, is not unbiased at all and produces noticeably skewed results depending on the sort implementation.
The randomness comes from the browser standard random number generator rather than the cryptographic one. For shuffling a reading list, randomizing quiz questions, picking a running order, or breaking up a set of test inputs, that is entirely adequate.
It is not adequate for anything where the outcome has to be unpredictable to an adversary. A prize draw, a security-relevant selection, a lottery, or anything where somebody has an incentive to predict or reproduce the result needs a cryptographic source. Do not use this for those.
Blanks, duplicates, and repeat shuffles
Blank entries are dropped by default, which is almost always what you want. Text pasted from a document or an export tends to carry empty lines that would otherwise be shuffled into the middle of your list as meaningless gaps. Turn the option off if the blanks are meaningful to you, for instance if they separate groups.
Duplicate removal is available and off by default. When enabled it compares entries after trimming, so two lines differing only in trailing whitespace count as the same, and keeps one of each. That is useful for a list assembled from several sources, and unhelpful when repetition is intentional, which is why it is opt-in.
Pressing the shuffle button again produces a fresh arrangement from your original input rather than reshuffling the previous output. There is no seed field, so a given arrangement cannot be reproduced later, and no line counter, so if you need to confirm nothing was lost you should count before and after yourself.
- Blank entries are dropped by default; duplicate removal is opt-in
- Duplicates are compared after trimming, so trailing spaces do not hide them
- No seed, so an arrangement cannot be reproduced afterwards