A CSV whitespace cleaner is a free online tool that removes stray spaces from spreadsheet data. It trims leading and trailing whitespace in every cell and can collapse repeated inner spaces to one, fixing the invisible gaps that break VLOOKUPs, filters, and duplicate detection. A change report shows exactly which cells were touched.
How do I remove extra spaces from a CSV file?
Short answer: Paste your CSV or upload the file, keep Trim and Collapse ticked, and press Clean whitespace. Every cell is stripped of leading and trailing spaces, and runs of two or more inner spaces become one. The cleaned CSV appears below with a report of how many cells changed and before-and-after samples.
This fixes the classic invisible mismatch where Ana and ' Ana ' look identical in a spreadsheet but fail to match in lookups and filters.
Will trimming break my quoted fields?
Short answer: No. Cleaning works on the parsed cell values, not on the raw text, so quoting is rebuilt from scratch afterwards. A value like Lima, Peru keeps its comma and gets correctly re-quoted, and escaped quotes inside fields survive untouched. Only whitespace at the edges and repeated inner spaces change.
Values that are intentionally padded, such as fixed-width codes, should be cleaned with the collapse option off, or excluded by cleaning a copy first.
Why do extra spaces appear in CSV exports?
Short answer: They creep in from manual data entry, copy-paste from documents, and exports that pad fields for alignment. Because spaces are invisible in most spreadsheet views, they go unnoticed until a VLOOKUP returns no match or a duplicate check misses a repeat. Cleaning whitespace is the fastest fix.
Pair this with the CSV Duplicate Finder afterwards: trimmed values dedupe correctly where padded ones did not.
Frequently asked questions
Is this CSV whitespace cleaner free?
Yes. Clean unlimited CSV data with no account and no limits. It runs entirely in your browser.
What exactly gets trimmed?
Leading and trailing spaces, tabs, and line breaks in every cell, including header cells. Inner single spaces between words are never touched unless you enable collapsing.
What does collapse inner spaces do?
It replaces any run of two or more whitespace characters inside a cell with a single space, turning 'Lima Peru' into 'Lima Peru'. Unticked, inner spacing is left exactly as it is.
Does it delete any rows or columns?
No. Every row and column is preserved; only whitespace inside cells changes. Use the CSV Cleaner if you also want empty rows and columns removed.
Is my data uploaded anywhere?
No. All cleaning happens locally in your browser, including uploaded files.