About Remove Extra Spaces
This tidies up the invisible mess that creeps into text — double and triple spaces, stray tabs, trailing spaces at the end of lines, and empty lines. It's useful after copying text out of a PDF or web page (which often adds irregular spacing), before pasting into a form or CMS with strict formatting, when preparing clean data for import, or just to make a document consistent. Each cleanup is a separate toggle, so you only apply what you want.
How it works
It processes your text line by line, applying whichever options you've enabled:
- Convert tabs to spaces — each tab becomes a single space.
- Collapse multiple spaces — any run of two or more spaces becomes one.
- Trim lines — leading and trailing spaces on each line are removed.
- Remove blank lines — lines that are empty (or only whitespace) are dropped.
The options are applied in that order per line, so tabs are normalised before spaces are collapsed.
Assumptions and behaviour
- It operates within lines — line breaks between rows are preserved (use Remove Line Breaks if you want to join lines).
- "Collapse multiple spaces" targets space characters specifically; enabling "convert tabs" first ensures tabs are folded into that too.
- "Trim lines" affects each line independently, not just the start and end of the whole text.
Limitations
- It doesn't collapse or alter line breaks themselves — multiple blank lines are only removed via the blank-line toggle, and it won't merge wrapped lines into paragraphs.
- It handles ordinary spaces and tabs; unusual Unicode whitespace (non-breaking spaces, zero-width spaces) that can sneak in from web copies aren't specifically targeted by the space-collapsing step.
- It's a formatting cleaner, not a text reflow tool — it won't re-wrap long lines to a width.
Privacy
All cleaning happens in your browser. Your text is never uploaded or stored.

