Whitespace Cleanup Tool - Remove Spaces, Tabs and Line Breaks

With this tool you can clean, normalize, and remove extra spaces, tabs, and line breaks in your text and code.

Cleanup mode
0 characters
0 characters

Frequently asked questions

What exactly does it clean up?

Repeated spaces, tabs, trailing spaces at the end of lines and excess blank lines, each with its own setting.

What is the difference between the two modes?

Remove all breaks is the quick one: every run of spaces, tabs and line breaks becomes a single space and the ends are trimmed, so the text comes back as one paragraph. Choose what to clean opens the same settings as checkboxes, starting from what the quick mode does, so you can keep the parts you want.

Will it destroy my paragraph structure?

Only if you ask it to. Switch to Choose what to clean and untick Every line break, and your paragraphs stay where they are while the spacing is tidied around them. A Blank lines setting appears alongside it, for whether several empty lines in a row should come down to one.

The text looks identical. Did anything happen?

Probably, yes. Most of what gets cleaned here is invisible by nature - a second space, a tab, a non-breaking space that looks like an ordinary one. The count under the result says how many characters went, which is the quickest way to tell.

Why does text copied from a PDF have so much stray whitespace?

PDFs store text as positioned fragments rather than flowing lines, so copying often introduces extra spaces and line breaks. This tool is the quickest way to undo that. Whitespace you cannot see at all is a separate problem: see the Invisible Character Remover for no-break spaces and zero-width characters.