How to use this tool
- Paste the text you want to clean.
- Choose whether runs of extra blank lines should become one blank line.
- Run Clean whitespace and compare the output with the source.
Understanding the output
Horizontal whitespace becomes a single ordinary space. Each line is trimmed at both ends, and leading or trailing blank space around the whole passage is removed. Line breaks inside the text remain; only extra blank lines are collapsed when that option is enabled.
When hard-wrapped lines should become continuous prose, use the Line Break Remover instead of treating all spacing as the same problem.
Cleaning a spaced line
A line containing two leading spaces, A, three spaces, spaced, a tab, and line. becomes A spaced line. Two paragraphs remain separate after cleanup.
Repair copy-and-paste spacing carefully
Text copied from a PDF, email, or document can contain runs of spaces, tabs, and nonbreaking spaces. These can make a passage difficult to edit or cause unexpected matches when searching. Normalizing spacing is useful for ordinary prose, but it also removes deliberate alignment created with spaces. Keep the original when that alignment conveys meaning.
If the source is a table, consider converting it with a data-aware tool instead. Whitespace alone may be separating columns, and turning several spaces into one can erase the only visible distinction between neighboring values.
Preserve paragraphs while reducing clutter
A blank line often separates ideas, whereas three or four blank lines usually create unnecessary gaps in a pasted draft. The optional blank-line cleanup reduces those larger gaps to a single paragraph separator. It does not decide whether two adjacent lines belong to the same sentence. Use the dedicated line-break remover when the text is hard-wrapped and should flow continuously.
Method and supported input
Line endings are normalized to newline characters. Horizontal whitespace runs are replaced with one space; line edges and the passage edges are trimmed. Optional blank-line collapse retains two newline characters between paragraphs.
- The input is prose or another format where repeated horizontal spaces are not significant.
Limitations
- Indentation, fixed-width columns, and tabs will be changed.
- Do not use this on source code, poetry, or structured data unless the spacing changes are intentional.
Common questions
Will this remove all line breaks?
No. Ordinary line breaks remain. Extra blank lines are collapsed only when the option is enabled.
Are nonbreaking spaces preserved?
No. Horizontal whitespace is normalized to ordinary spaces, including nonbreaking spacing characters.