Whitespace Cleaner guide
Normalize unwanted spaces, tabs, and repeated blank lines with individually controlled cleanup rules.
What this tool does
Whitespace Cleaner applies only the options you enable. It can trim whitespace from the beginning and end of every line, replace repeated ordinary or non-breaking spaces with one space, reduce consecutive blank lines to a single blank line, and convert tab characters to a chosen number of spaces. Windows and older carriage-return line endings are normalized to line feeds in the result.
The result panel reports how many source lines changed, the line count before and after cleanup, and the net character difference. This makes the transformation easier to review than a silent replacement. The tool does not rewrite words, punctuation, letter case, or sentence order.
Whitespace can carry meaning. Indentation matters in Python, YAML, Markdown code blocks, tables, ASCII art, poetry, and aligned plain-text records. Collapsing spaces or converting tabs can damage those structures even though the text still looks readable. This tool is therefore a controlled text cleanup utility, not a programming-language formatter or document-layout engine.
How to use it
- Paste the text and keep an unchanged source copy.
- Enable only the cleanup rules appropriate for that content.
- If converting tabs, choose between one and eight spaces per tab.
- Select Clean whitespace.
- Review line counts and inspect the output before copying it.
For Markdown or source code, begin with only trailing and leading line trimming, then test the result in the destination renderer or interpreter. For prose copied from forms or spreadsheets, collapsing repeated spaces and blank lines is often appropriate.
Benefits
- Offers four independent whitespace controls
- Normalizes common cross-platform line endings
- Reports line and character changes
- Preserves the original input while showing output separately
- Runs locally without transmitting pasted text
Choosing safe options
Trimming lines removes intentional indentation as well as accidental padding. Collapsing spaces also changes columns created with manual spacing. Tab conversion uses a fixed number of spaces and does not calculate visual tab stops, so deeply aligned content may shift. Repeated blank-line cleanup retains one blank separator between nonblank sections rather than removing all paragraph spacing.
If exact byte-for-byte formatting matters, use a purpose-built formatter and a version-control diff. Never replace the only copy of a contract, data export, configuration, or code file based solely on a visual glance.