How to use this tool
Choose a whitespace operation that matches your task. Trimming works on each line; collapsing repeated horizontal spaces keeps line breaks; removing blank lines preserves the other lines; single-line mode replaces whitespace runs with one space. Output uses LF newlines. These changes can alter code, indentation or fixed-width records.
Try these values
“one two” becomes “one two” with space collapsing. Single-line mode also joins text separated by tabs or line breaks.
Common questions
Will indentation be preserved?
Not by every mode. Trimming or collapsing can remove meaningful indentation.
Does removing blank lines trim other lines?
No. It removes whitespace-only lines and preserves the content of retained lines.
Something doesn’t add up? Report an issue · Methods & corrections