FixThatAppAll Tools
Writing

Whitespace Cleaner

Trim extra spaces, tabs, and blank lines.

How This Tool Works

The Whitespace Cleaner removes invisible whitespace problems from text: trailing spaces at end of lines (which break some file formats), non-breaking spaces (Unicode U+00A0, which look identical to regular spaces but aren't), double spaces, Windows CRLF line endings (converted to Unix LF), tab characters, and zero-width characters (U+200B, U+FEFF byte order mark). These invisible characters cause unexpected failures in databases, code parsers, CSV files, and search/comparison operations that appear to work visually but fail functionally.

How to Use

  1. Paste your text in field A.
  2. Click Run. The cleaned text is returned with invisible whitespace normalized.
  3. The result summary shows what was cleaned (e.g. '12 trailing spaces removed, 3 non-breaking spaces converted').
  4. For code: pay special attention to mixed tabs and spaces, which cause IndentationError in Python.

Common Questions

What is a non-breaking space and where does it come from?

A non-breaking space (U+00A0) looks identical to a regular space but is a different character. It appears when copying from PDFs, Word documents, or some web pages. Databases and code that compare strings see 'hello world' (regular space) and 'hello world' (NBSP) as different strings.

Why does Excel's TRIM function not remove all spaces?

Excel's TRIM only removes regular spaces (U+0020) and ASCII tabs. It does not remove non-breaking spaces, zero-width characters, or other Unicode whitespace. Use this tool for comprehensive cleaning before importing into Excel.

What are zero-width characters?

Zero-width characters (U+200B zero-width space, U+FEFF BOM) are invisible and have zero visual width. They appear when copying from some websites or apps. They can break string matching, URL parsing, and code execution silently.