Clean up messy spacing in one step
Pasted text is often littered with double spaces, trailing whitespace and stray blank lines. This tool tidies all of it: collapse runs of spaces into one, trim the start and end of each line, and optionally remove empty lines — while leaving your actual line breaks intact.
Related tools
Need to get rid of the line breaks themselves? Use remove line breaks. Want to swap a word throughout? Try find and replace, and count the result with the character counter.
How to use it
- Paste your text into the box.
- The tool collapses multiple spaces into single ones and trims stray spaces from the start and end of lines.
- Copy the cleaned text back out.
Where extra spaces come from
Messy spacing creeps in more often than you'd think: copying from a PDF or web page where layout adds gaps, the old habit of two spaces after a full stop, hitting the space bar to fake indentation, or merging text from several sources. Extra spaces look sloppy, can break alignment, and inflate character counts — a quick clean fixes all three.
For a fuller tidy-up, remove unwanted breaks with remove line breaks, swap terms with find and replace, or check the result with the character counter.
Frequently asked questions
How do I remove double spaces?
Paste your text and the tool collapses any run of two or more spaces into a single space automatically. You can also trim each line and drop blank lines.
Does it remove line breaks too?
No, it keeps line breaks by default and only tidies spaces. To remove line breaks, use the remove line breaks tool instead.
Is my text kept private?
Yes. All cleaning happens in your browser and nothing you paste is uploaded.