Understanding whitespace cleanup
Four cleanups, one toggle each.
Whitespace is invisible until it isn't — and then it's everywhere.
Trim — leading and trailing only.
Trim mode strips whitespace from the start and end of each line, leaving the middle alone. Useful for cleaning up exports where every line picked up a stray tab. The most conservative option — it never changes the visible shape of paragraphs, only the bytes around them.
Collapse — many spaces become one.
When text has been mangled by copy-paste, you often end up with double or triple spaces between words. Collapse mode reduces every run of spaces and tabs to a single space. Doesn't touch newlines, so paragraph structure survives. Run after Trim for thorough whitespace normalisation.
Strip — every whitespace character.
The nuclear option: every space, tab, newline, and other whitespace character disappears, packing the input into a single contiguous run of non-whitespace. Useful for generating identifiers ("Hello World" → "HelloWorld"), comparing strings byte-for-byte ignoring layout, or minifying snippets where whitespace doesn't matter.
Drop blank lines.
Sometimes you have a list separated by blank lines and you want it dense — drop-blank-lines collapses runs of empty lines but leaves non-empty content alone. Combined with Trim, this gets you from a messy paste into a clean one-thing-per-line list.
Non-breaking spaces and other invisibles.
A regular space is U+0020. A non-breaking space is U+00A0. They look identical and most tools treat them as the same for layout, but byte-for-byte they differ. The Strip and Collapse modes handle both, but Trim only catches the regular space. If your input came from a Word document or a Wikipedia paste, expect U+00A0 and use Strip / Collapse for thorough cleanup.