Shuffle Text
TextEverything runs locally in your browser — nothing is uploaded
Shuffle the order of a block of text. Each of the three units keeps what it should: lines only changes which line comes first (the line count and their contents are untouched); characters rearranges each line internally (the line structure stays, and a line break is never treated as a character that can wander off); words reorders words only, leaving the gaps between them and the leading and trailing whitespace where they were. The shuffle is Fisher–Yates. The common “swap a few random pairs” approach produces a biased distribution — some orders show up noticeably more often than others, which is a real defect for name lists, draws and sampling. The backwards Fisher–Yates variant gives every permutation the same probability. It is not live. A live mode would recompute on every keystroke: you spot the order you want, and the next key replaces it before you can copy. So there is an explicit button.
Features
- Three units: lines, characters and words
- Fisher–Yates shuffle, so every permutation is equally likely rather than approximately so
- Word mode keeps leading and trailing whitespace and the gaps between words
- Character mode keeps the line structure; emoji and ZWJ sequences move as whole clusters
- One click gives a new arrangement; nothing recomputes until you ask
- Blank lines are ordinary lines and take part like any other
- Everything runs locally in your browser; nothing is uploaded
How to use
- Paste the text you want to shuffle
- Pick a unit
- Click Shuffle again for a new arrangement, then Copy when you like what you see
FAQ
- Sometimes the result looks unchanged. Is it broken?
- No — a random shuffle is allowed to return the original order. With two lines that happens 50% of the time; with three lines, about 17%. Shuffle a few times and watch, or try a longer input: with ten lines it is very unlikely to repeat. There is deliberately no “always different from last time” patch, because forcing that would make the distribution uneven.
- Why can’t it shuffle as I type?
- Because a shuffle cannot be derived from the input. A live mode recomputes on every keystroke, so the order you just decided you liked is replaced before your mouse reaches the copy button. Hence an explicit button — the same reasoning as the UUID and password generators.
- Is the shuffle fair?
- Yes. It uses Fisher–Yates (the backwards variant), where every one of the n! permutations has probability 1/n!. The common “walk the array and swap each element with a random position” loop has a measurable bias, which does matter for draws, sampling and random grouping.
Related tools
Reverse Text
TextReverse text by characters, lines, line order or word order. Emoji and combining marks stay intact. Runs entirely in your browser.
Text Cleaner
TextClean up a column pasted out of a log or spreadsheet: deduplicate, sort, drop blank lines, trim whitespace and strip line numbers, all in your browser.
Random Chinese Characters
GeneratorsGenerate random strings of Chinese characters from a common pool of about 850, or the full basic CJK block. Runs entirely in your browser.
Text Diff
TextCompare two blocks of text online and highlight added, removed and unchanged lines, so only the lines that changed are marked. Runs in your browser.
Word Counter
TextCount Chinese characters and English words separately, alongside characters, lines, real UTF-8 bytes, reading and speaking time, and SMS segment counts.
Case Converter
TextConvert identifiers between fourteen naming styles. Words are split correctly first, so acronyms such as HTTPServer come out right, all in your browser.