Trim Whitespace in a CSV
Clean the whitespace you can't see. Leading and trailing spaces break exact joins, grouping, and deduplication while looking completely normal on screen — and text pasted from a web page or a PDF often carries non-breaking spaces and zero-width characters that behave like invisible letters. This strips all of it, cell by cell, and reports how many cells changed.
How to trim a CSV
- Paste the CSV or drop a file. The three most common fixes are already ticked.
- Add collapse double spaces for text that was manually typed or line-wrapped.
- Add the drop options if the file has trailing empty rows or columns from a spreadsheet export.
- Check the report in the status line, then copy or download.
The characters this removes
- Edge whitespace — spaces, tabs, and stray newlines at the start or end of a cell. The single most common reason a join or a
VLOOKUP"should match but doesn't". - Non-breaking space (
U+00A0) and its typographic relatives — these come from HTML, Word, and PDFs. They look exactly like a space and are not one, so"Kyiv"and"Kyiv"compare as different strings. - Zero-width characters (
U+200B–U+200D,U+2060,U+FEFF) and soft hyphens — completely invisible, and they make a cell's length wrong and any comparison fail. - Control characters — stray bytes that survive a bad export and can break strict importers outright.
Clean the header names too
A header with a trailing space is especially nasty: your column is "email ", every reference to email silently returns nothing, and the file looks perfect. That option is on by default. A BOM on the very first header is the same class of problem — Encoding & BOM handles that one.
FAQ
Will this change values I care about?
Only whitespace and invisible characters. Visible text, punctuation, and casing are untouched — use Find & replace for those.
Does it trim inside quoted fields?
Yes — trimming works on parsed cell values, so quoting doesn't hide anything. Output is re-quoted properly.
How do I know it actually did something?
The status line counts changed cells and separately reports how many contained invisible characters, so you can tell whether the problem was really whitespace.
Is anything uploaded?
No. It all runs in your browser.
Privacy
100% client-side. No upload. See the privacy policy.