Trim & Clean
Remove extra whitespace, trailing spaces, and collapse blank lines for clean text.
What gets cleaned
Each line is trimmed (leading/trailing spaces removed) and internal multiple spaces are collapsed to single spaces. Lines with only whitespace become empty after trimming. Three or more consecutive blank lines are collapsed to two. The result is trimmed at the start and end of the document.
| What is cleaned | Example before | After |
|---|---|---|
| Leading spaces on a line | " hello world" | "hello world" |
| Trailing spaces on a line | "hello world " | "hello world" |
| Internal multiple spaces | "hello world" | "hello world" |
| Excessive blank lines | "A B" | "A B" |
| Leading/trailing document whitespace | " \n text \n " | "text" |
What does NOT get cleaned
Single blank lines between paragraphs are preserved — Trim & Clean collapses runs of 3+ blank lines to 2, but does not remove all blank lines. Tab characters within a line are also not converted to spaces; only runs of space characters are normalised.
Tip: To remove all blank lines entirely (not just collapse them), use the Remove Empty Lines tool. To also handle typographic artifacts like smart quote corruption or Windows-1252 encoding, use the Typography Cleaner tool.
Frequently Asked Questions
Your files stay on your computer. Dad promised.