How to Remove Extra Spaces in Google Sheets
Cells pick up stray spaces from data imports and from pasting in text that was typed or copied elsewhere: Word, Docs, a webpage, a CSV export. This guide covers Sheets' own TRIM formula, the step that makes it stick, a filter-based blank-rows cleanup, and a way to check for spaces that don't show up visually.
The TRIM function
In an empty column next to your data, add a formula and fill it down:
TRIM removes spaces from the start and end of the cell and collapses any run of spaces between words down to one. It's a formula, though: the original cell is untouched until you copy the TRIM column, then Paste special → Values only back over the original column. Delete the helper column once the values have landed.
Skip the manual steps. Clean your text instantly, right here.
Clean it instantly with the free toolFind and Replace for double spaces
For a quicker fix without a helper column:
This only catches spaces between words. It won't touch spaces at the very start or end of a cell the way TRIM does, so it's a shortcut for the common case, not a full replacement for TRIM.
Removing blank rows
Sheets has no Go To Special like Excel, so there's no one-click way to select every blank cell in a range. A filter does the same job in a few extra steps:
The filter now shows only the blank rows. Select their row numbers, right-click, and delete rows, then go back to Data → Remove filter to see the rest of the sheet again.
Checking for spaces you can't see
Compare a cell's length before and after trimming:
If the two numbers differ, the cell has spaces TRIM would remove. TRIM alone leaves a non-breaking space (common in data pasted from a webpage) untouched, since it isn't a regular space. Clear those with:
For data you're about to paste into Sheets anyway, running it through the free tool first often saves the formula-and-paste-as-values round trip entirely.