Runs in
Your browser
Price
Free
Sign-up
Not needed

Trim whitespace in a CSV

Strip the invisible spaces that stop values from matching: leading and trailing spaces, non-breaking spaces and zero-width characters.

  • Nothing uploaded
  • Instant results
  • No account needed
01 · Input

Drop a CSV file hereUp to 10 MB · processed in this tab, never uploaded

02 · Result

Your result appears here as soon as you add a file.

How it works

Three steps, nothing to install
  1. 01

    Add your CSV by dropping a file or pasting text.

  2. 02

    Choose whether to collapse repeated spaces inside values and remove zero-width characters.

  3. 03

    Review the highlighted cells, then download the trimmed file.

Good to know

What the tool does, exactly

What gets removed

Spaces, tabs and line breaks at the start and end of every cell, including non-breaking spaces (common in text copied from web pages and PDFs). Zero-width characters are removed anywhere in a cell, and repeated spaces inside a value can be collapsed to one.

Why it matters

A trailing space turns “Lisbon” into a different value from “Lisbon ”. Lookups fail, pivot tables split one group into two, and duplicate checks miss repeated rows. Trimming first makes every other clean-up more reliable.

Private by design

The file is processed in your browser and never uploaded, so it’s safe for customer lists and financial exports.

Questions

About trim whitespace
Does it trim the header row too?

Yes. Column names with stray spaces cause the same lookup and import problems as values.

What is a non-breaking space?

A character (U+00A0) that looks like a space but is not one. It often arrives from web pages, Word documents and PDFs, and ordinary trimming in some tools leaves it behind. This tool removes it.

Will it change spaces between words?

Only if you turn on “Collapse repeated spaces”, which turns runs of spaces inside a value into a single space. Single spaces between words are never touched.

Are line breaks inside quoted cells kept?

Line breaks in the middle of a value are kept. Only those at the very start or end of a cell are removed.

All free tools

Cleaning the same
files every week?

Create an account

The free workspace saves each dataset, with undo and a full history. See features