Clean up messy spacing in any text.
🧹 Combines whitespace collapsing, blank-line removal, deduplication, and sorting into one tool. Toggle any option above; everything runs locally in your browser.
This tool cleans up messy whitespace: trims leading and trailing spaces from each line, collapses multiple consecutive spaces into one, and removes empty lines. The result is neat, consistent text.
This tool removes all extra whitespace. If you have intentional indentation (like code or poetry), don't use it on that text — the defaults will flatten everything. To keep indentation, uncheck Trim each line and Collapse multiple spaces above.
More tools you might find useful
Narrow down Wordle answers by known, included, and excluded letters.
Count words, characters, sentences, and reading time instantly.
Add line numbers to each line of your text.
Count how often each character appears in text.