Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Collapse repeated spaces and tabs in text down to a single space.
Your result will appear here.
Copy-pasting between different apps (a spreadsheet, a PDF, an old document) often leaves behind doubled or tripled spaces between words. This tool collapses any run of 2 or more spaces/tabs down to a single space on every line, while keeping your actual line breaks and paragraph structure intact -- unlike a full line-break remover, it doesn't flatten your text into one block.
Paste your text into the input box. The cleaned version, with all extra spacing collapsed, appears instantly.
The text is split into lines, and each line is cleaned on its own. Within a line, any run of spaces or tabs, including a single tab, is replaced by one plain space. Then the spaces at the beginning and the end of that line are removed. The lines are then joined back together with normal line breaks. The number of lines stays the same, so empty lines between paragraphs remain empty lines.
Two side effects matter in practice. First, leading indentation is removed, so a line that started with four spaces or a tab now starts at the left edge. Second, tabs used to align columns are converted to single spaces, so tab-separated data loses its tab structure.
Suppose you paste this, where each gap is several spaces:
The result is two lines: Order received on Monday, and Shipping will follow. Words are separated by exactly one space, and no line begins or ends with a space. That matters when the text goes into a system that compares strings exactly, since an invisible trailing space makes two otherwise identical entries look different.
If a gap still remains after cleaning, retype it or paste it into a plain text editor to see what character is there. Compare a line before and after using the counters in your editor: the character count should drop by the number of removed spaces, and the line count should be identical.
No -- only repeated spaces/tabs within a line are collapsed. Real line breaks between paragraphs are left exactly as they are.
No -- everything runs locally in your browser. Your text is never uploaded anywhere.
Yes. Each line is trimmed at both ends, so leading spaces or tabs are removed along with trailing ones.
A tab, or any run of tabs and spaces, is replaced by a single space. Tab-separated columns will therefore be merged with single spaces.
Yes. Lines are processed one by one and rejoined, so blank lines stay in place, as does the total number of lines.
It may be a non-breaking space or another special whitespace character. The tool only collapses ordinary spaces and tabs, so such characters need to be replaced by hand.