CleanCSV

Trim Spaces and Remove Hidden Characters in CSV Files

Remove leading, trailing and repeated spaces, plus non-breaking spaces and zero-width characters that break lookups, matching and imports.

Free, no sign-upFiles never leave your deviceCSV, Excel & JSON

CSV & Excel cleaning workspace

No account. No uploads. Just clean data.

100% in your browser
1

Upload your file

Drop your CSV or Excel file here

or browse your device. You can select several files at once.

CSV, TSV, TXT, XLSX, XLS, ODS and JSON · up to 50.0 MB and 250,000 rows

Your files never leave your device.

Step by step

How to use this tool

  1. 1

    Drop your CSV or Excel file into the tool above.

  2. 2

    Trim spaces, Collapse repeated spaces and Remove invisible characters are already on. Changed cells are highlighted in the preview with their old value underneath.

  3. 3

    Optionally remove line breaks inside cells or change text case in the same pass.

  4. 4

    Download the cleaned file as CSV, Excel or JSON.

Why extra spaces cause problems

“London” and “London ” look the same on screen but are different values to a computer. Trailing spaces make VLOOKUP and XLOOKUP fail, split one category into two in pivot tables and create duplicate contacts when you import into a CRM. Trimming every cell before you import or analyze data prevents all of that.

Spaces you cannot see

Data copied from websites, PDFs or Word often contains non-breaking spaces (U+00A0) and zero-width characters. Excel's TRIM function does not remove them. Remove invisible characters turns non-breaking and other unusual spaces into normal spaces and deletes zero-width and control characters, so the trim that follows catches everything.

What is not changed

Single spaces between words are kept; only runs of two or more become one. Line breaks inside cells are kept unless you choose to remove them, and header names are left alone unless you pick a header style in the Columns section.

Frequently asked questions

Is this the same as Excel's TRIM function?

It does what TRIM does, removing leading, trailing and repeated spaces, and also removes non-breaking spaces and invisible characters that TRIM leaves behind.

Can I trim only some columns?

Trimming applies to every cell, which is almost always what you want. To change spacing in one column only, use Find & replace with a column selected.

Will it change my numbers?

No. Trimming only removes spaces around values. Numbers, dates and leading zeros stay exactly as they are.