DEVELOPER & DATA

Whitespace Cleaner

Fix whitespace only: trailing spaces, space runs, tabs ↔ spaces, blank-line runs, final newline, LF/CRLF, and non-breaking or zero-width spaces — each counted.

The same text with only its whitespace changed, a detection summary (CRLF/LF, tabs, trailing, unusual spaces) and a count for every step applied.

Example: A file with mixed CRLF/LF, 37 trailing spaces and three-line gaps comes back LF-only, trimmed, with single blank lines and exactly one newline at the end.

v0.1.0 · last reviewed 20 September 2026
Loading the workspace…
BUILT TO BE UNDERSTOOD

Only the spaces change,
and each change is counted.

What is detected, what each option does, and the one option that is not safe for aligned text.

Detection

Before anything runs, the text is scanned for CRLF and LF endings, tabs, trailing whitespace and unusual spaces (no-break, en/em and other typographic spaces, ideographic space) and invisible zero-width characters, so you can see what the file contains.

The steps

In order: unusual spaces → plain space and invisible characters removed; tabs ↔ spaces at the chosen width (everywhere, not just indentation — the Indent Converter handles indentation alone); runs of spaces inside lines collapsed; leading whitespace removed; trailing whitespace removed; runs of blank lines reduced to one; the final newline set to exactly one or none; line endings converted. Each step reports a count.

Cautions

Collapsing space runs breaks column alignment and multi-space string literals; converting every run of spaces to tabs does the same. Both are off by default and warn when on. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.

SOURCES

Last reviewed 20 September 2026. How results are checked: How we verify.