CSV Whitespace Trimmer (Trim and Collapse Spaces in Every Cell)
Cleans invisible spacing problems in every cell: leading and trailing spaces, double spaces, tabs, non-breaking spaces and zero-width characters.
Use the tool
Why this tool exists
Stray spaces cause failed joins, duplicate-looking rows and sorting surprises. Non-breaking spaces and zero-width characters look like nothing but are not equal to a normal space or to nothing.
The tool replaces all Unicode space separators with a plain space, optionally collapses runs, removes zero-width characters and trims each cell. The summary says how many cells changed so you can tell whether the data had a problem.
How to use it
- Paste the CSV or table.
- Choose whether to collapse internal runs and remove zero-width characters.
- Read the changed-cells count.
- Copy or download the cleaned CSV.
Frequently asked questions
Does it change line breaks inside cells?
Yes when collapsing: any whitespace run, including a line break, becomes one space.
Does it touch the header?
Yes, header cells are cleaned too.
Are numbers changed?
Only surrounding spaces are removed.
Which characters count as spaces?
Regular space, tab, NBSP, the Unicode en/em spaces, narrow NBSP and ideographic space.