Trim Spaces in a CSV File

Remove extra spaces from every cell or only the columns you pick in a CSV or Excel file. Free, in your browser, and the file is never uploaded.

Quick answer: Join files on a key, trim, concatenate, fix dates, filter and more, in the order you choose.

Related: Data Transformation: Join, Trim, Concatenate · Change Date Format in a CSV File · Convert Excel Date Numbers to Dates · Join Two CSV Files on a Key · CSV Guides and Free CSV Tools

How to use the Trim Spaces in a CSV File

Join files on a key, trim, concatenate, fix dates, filter and more, in the order you choose.

Data Transformation lets you reshape a file with a list of steps instead of formulas. Join two files on a key with an inner, left, right or full join, trim spaces, concatenate or split columns, change date formats, change case, find and replace, filter, sort, remove duplicates and fill empty cells. See the result straight away, then download it or send it to another tool. Every step is recorded in Data Lineage.

  1. Load a file (and a second one to join)
  2. Add the transformations you want
  3. Check the result and download

Tips

Example

Input: " Ada ", " london "

Output: "Ada", "london"

Browse by topic

Who uses Data Utility

Frequently asked questions · Data format benchmark

Frequently asked questions

Does it remove spaces inside text too?

It removes spaces at the start and end and turns repeated inner spaces into one space.

Why trim before a join?

A stray space makes two matching keys look different. Trimming first makes sure they match.

Can I join two files or combine columns?

Yes. Data Transformation lets you join two CSV or Excel files on a key (inner, left, right or full), and trim spaces, concatenate columns, change case, find and replace, split, rename, filter, sort, remove duplicates and fill empty cells. You choose the steps, check the result and download it. Your files stay in your browser.

Which transformations are available?

Join with a second file (inner, left, right or full), trim spaces, concatenate columns, change date formats, change text case, find and replace, split a column, rename or remove columns, filter rows, remove duplicates, sort and fill empty cells. Steps run from top to bottom and you can reorder them.

Can I change the date format of a column?

Yes. Add a Change date format step, pick the column and the new format, such as 2026-03-09, 09/03/2026 or March 9, 2026. It reads many layouts, Excel date numbers and unix timestamps, and can also give only the year, month, weekday or quarter. If 03/04/2026 is unclear, you choose day first or month first.

Is Data Transformation a VLOOKUP alternative?

For lookups between two files, yes. A join adds the matching columns from the second file to every row of the first, with no formulas. Keys are matched ignoring case and extra spaces.

Related pages

Topic guides

Guides