With this tool you can clean, normalize, and remove extra spaces, tabs, and line breaks in your text and code.
Whitespace is the one kind of mess you cannot see. A paragraph with three spaces between two words looks much the same as one with a single space, right up until it lands in a spreadsheet, a database or a template and stops matching what it should match.
It arrives on its own, too. Copy a few lines out of a PDF and you get spaces where the layout used to be. Paste from Word and half of them are non-breaking spaces that look ordinary and behave as anything but. Pull a column out of a CSV and every value has a tab clinging to the end of it.
Runs of spaces become one. Tabs become a space each. Spaces hanging off the ends of lines go, along with the ones at the very start and end of the text. Blank lines stacked several deep come down to one. And the spaces that only look like spaces — non-breaking, thin, and the rest of the family — become the ordinary kind.
Line endings are squared up on every pass, whichever mode you are in, so a file that has been round a Windows machine and a Mac stops being a mix of the two. It is the one thing here nobody has ever wanted to opt out of.
Paste your text in. If you just want the mess gone, leave it on Remove all breaks: every run of spaces, tabs and line breaks becomes a single space, and the ends are trimmed. That is the right answer for a stray paragraph, and the wrong one for anything with paragraphs worth keeping.
For that, switch to Choose what to clean. The settings start where the simple mode left off, so the boxes show you what it was already doing and your first click is an adjustment rather than a fresh start. Untick Every line break and your paragraphs survive — and a further setting appears, for how many blank lines you want left between them.
The result updates as you type, and the count under it says how many characters went. Nothing is uploaded — it all runs in your browser.
Repeated spaces, tabs, trailing spaces at the end of lines and excess blank lines, each with its own setting.
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.
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.
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.
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.