Where extra spaces come from and how to clean them
Why copied text picks up double spaces, tabs, and blank lines, plus how to fix each kind of clutter without breaking your content.
Why pasted text is full of stray spacing
Extra spaces rarely appear on purpose. They creep in when you copy from a PDF that pads columns, paste from an email that wraps long lines, or move text out of a spreadsheet where cells are separated by tabs. Word processors also leave behind the old typing habit of two spaces after a period. Because these characters are invisible on screen, the mess only shows up when the text lands somewhere that cares, such as a form, a code editor, or a web page.
Collapsing runs versus trimming ends
The two default cleanups solve different problems. Collapsing runs targets the doubled spaces and tabs sitting between words, turning each cluster into one clean space so the sentence reads normally. Trimming lines targets the whitespace hiding at the start and end of a line, which is what causes ragged left edges and trailing spaces that break diffs or Markdown. Running both together fixes the two most common forms of clutter in a single pass.
Handling blank lines the way you want
Vertical spacing needs a lighter touch than horizontal spacing, because blank lines often carry meaning. A single blank line usually marks a paragraph break you want to keep, while a stack of five was probably an accident. That is why the tool separates the two: Remove blank lines strips them all for a tightly packed list, and Collapse blank lines preserves one gap between paragraphs while flattening the oversized ones. Choose based on whether the structure matters for your final destination.
Cleaning without corrupting your content
Spacing cleanup should never change meaning, and this tool is careful to touch only whitespace. Still, a few kinds of text depend on exact spacing: code that is indented with spaces, fixed-width tables, and ASCII art can all break if runs are collapsed. For those, turn off Collapse extra spaces and use only trimming, or clean a copy first and compare. For ordinary prose, notes, and pasted articles, the defaults are safe and produce clean, consistent output.