Trim whitespace and extra spaces in a CSV
Leading spaces, trailing spaces and doubled spaces break lookups, joins and duplicate checks without being visible. Upload a file and SpreadsheetFix strips them from every cell and removes fully blank rows.
Free up to 5,000 rows · No sign-up · Nothing uploaded
Drag & drop your file
or click to browse — CSV, TSV, XLSX up to 50MB
Before and after
sku,product,colour " A-100","Desk Lamp ","black" ,, "A-101 ","Floor Lamp"," white"
sku,product,colour A-100,Desk Lamp,black A-101,Floor Lamp,white
How it works
- 1
Upload your CSV, TSV or Excel file.
- 2
SpreadsheetFix trims both ends of every text cell, collapses repeated spaces to one, and removes rows that are completely empty.
- 3
Check the highlighted changes in the preview and download.
The bug you can’t see
“A-100 ” and “A-100” look the same on screen, but a VLOOKUP, SQL join or import matcher treats them as different values. Trailing spaces are one of the most common reasons a lookup returns #N/A on data that “definitely matches”.
Tabs and line breaks too
Whitespace trimming also handles tabs and stray line breaks inside cells — the usual leftovers from copying out of web pages, PDFs and email.
Only the columns you choose
Trimming applies to every column by default. If a column needs its spacing preserved — fixed-width codes, for example — restrict the rule to specific columns in its settings.
Frequently asked questions
How do I remove spaces from a CSV file?
Upload it above. SpreadsheetFix trims leading and trailing spaces in every cell and collapses repeated spaces, then lets you download the cleaned file.
Does it remove spaces inside words?
No. Single spaces between words are kept. Only spaces at the start and end of a cell are removed, and runs of multiple spaces are collapsed to one.
Is this the same as Excel’s TRIM function?
It does the same job across the whole file at once, without writing formulas or helper columns, and also removes completely empty rows.
Will blank rows be removed?
Yes, rows where every cell is empty are removed. Rows that are only partly empty are kept.
Cleaning bigger files every week?
Pro cleans up to 500,000 rows per file, unlocks all 18 rules, exports to Excel and removes the watermark.
See Pro pricingRelated tools
Delete duplicate rows from a CSV or Excel file in seconds. Exact or key-column matching, a full change log, and your data never leaves your browser.
Repair garbled characters like é, ’ and ü in a CSV and convert Windows-1252 files to UTF-8. Free, private, runs entirely in your browser.
Clean up a messy CSV — duplicates, blank rows, spacing, headers, dates — and save it as an Excel-ready file. Private, in-browser CSV to XLSX cleaner.