Trim lines, collapse repeated spaces and blank lines, convert tabs and normalise line endings — each a switch you control, nothing destructive by default.
Waiting for text
Nothing happens until you switch it on. Indentation and column alignment are left alone by default.
Paste text to clean
Line endings are normalised first, then only the operations you have switched on are applied.
Whitespace Cleaner runs entirely on your device — nothing is uploaded.
You’re on the Free plan. Compare plans
Text that has been through a PDF, a spreadsheet and a chat app arrives full of whitespace nobody typed: trailing spaces, runs of blank lines, tabs where spaces were meant, and line endings from three different operating systems. This cleans those up one operation at a time.
Which operations run by default is decided by how much each one costs you if it was not what you wanted. Trimming each line, collapsing runs of blank lines to one, and dropping blank lines from the start and end of the document are on, because they remove whitespace nobody put there deliberately. Collapsing repeated spaces, converting tabs, removing every blank line and stripping invisible characters are off, because each destroys something a reader may have meant — column alignment, indentation, paragraph breaks. A cleaner that silently un-indented a pasted code block would be worse than no cleaner at all.
Line endings are always normalised, because every other operation needs a single form to work on. You choose what is written back out: LF for Unix and macOS, CRLF for Windows, CR for classic Mac, or whichever convention the input mostly used. When a document mixes conventions the tool says so, since that is usually the bug someone is chasing.
Collapsing repeated spaces never runs across a line break and never touches a single space between words, so a paragraph stays a paragraph. The invisible-character option removes zero-width and directional formatting marks — the ones that survive copy-paste and break string comparisons in ways that are impossible to see — and deliberately leaves ordinary and non-breaking spaces alone.
The result reports exactly what changed: how many lines were trimmed, how many blank lines went, how many characters were removed.
It trims trailing and leading whitespace from each line, reduces runs of blank lines to one, and drops blank lines from the start and end of the document. Line endings are normalised to whatever the input mostly used. Nothing else is touched.
Only if you ask it to. Trimming lines is on by default and does remove leading indentation, so turn it off before cleaning a code block. Converting tabs to spaces is off by default and never runs unasked.
No. Only runs of two or more spaces or tabs inside a line are reduced, and the collapse never crosses a line break. What it does remove is column alignment built out of repeated spaces, which is why it is off by default.
All three: LF (Unix, macOS), CRLF (Windows) and CR (classic Mac). The input's own convention is detected and reported, mixed documents are flagged, and you choose what is written out.
Zero-width spaces, joiners and directional marks. They survive copy-paste from PDFs and chat apps, they are impossible to see, and they break string comparisons and search. Removing them is off by default because a few — inside emoji sequences and in right-to-left text — are load-bearing.
No. Every operation runs in your browser, and the text is never uploaded, logged or stored.