Extra spaces are the dust of digital text. They accumulate when you copy from a PDF, merge content from two documents, or hit the spacebar twice out of habit — and they’re nearly invisible until they break something: a misaligned table, a failed search, a sentence with an awkward gap. This guide covers every reliable way to remove extra spaces, from find-and-replace tricks in the apps you already use to the fastest one-click method, so you can clean up any text in seconds.
What counts as an “extra” space?
Not all whitespace is equal. “Extra spaces” usually means one of these:
- Double (or multiple) spaces between words — often a leftover habit from typewriter-era typing.
- Leading spaces at the start of a line.
- Trailing spaces at the end of a line, which you can’t see at all.
- Tabs masquerading as spaces, common in copied code or spreadsheet data.
- Non-breaking spaces (
), which sneak in from web pages and PDFs and resist normal cleanup.
The goal of cleanup is to collapse all of these down to a single normal space between words, with no stray whitespace at the edges.
Why extra spaces matter
They’re not just an aesthetic problem:
- Search and matching fail. A spreadsheet lookup or a database match treats
"John Smith"(two spaces) as different from"John Smith". Trailing spaces are the classic cause of “why won’t this VLOOKUP work?” - Layout breaks. Extra spaces push text out of alignment, especially in monospaced or tabular contexts.
- Word counts inflate. Some tools count runs of whitespace inconsistently.
- It looks unprofessional. Double spaces after periods and ragged gaps signal a document that wasn’t proofread.
The fastest method: a one-click cleaner
If you just want it gone, paste your text into the text cleaner. It collapses multiple spaces into one, trims leading and trailing whitespace, removes empty lines, and normalizes spacing in a single click — all in your browser, with nothing uploaded. For most cleanup jobs this is faster than hunting through a menu, and it handles all the whitespace types above at once.
That said, it’s worth knowing the manual methods too, because sometimes you’re already inside Word or a spreadsheet and don’t want to switch contexts.
How to remove extra spaces in Microsoft Word
Word’s find-and-replace can collapse double spaces, though it takes a small trick because replacing “two spaces with one” only handles pairs:
- Press Ctrl + H (Cmd + H on Mac) to open Find and Replace.
- In Find what, type two spaces (press the spacebar twice).
- In Replace with, type one space.
- Click Replace All — then click it again, repeatedly, until Word reports “0 replacements.” Each pass halves the runs, so three or four spaces need multiple passes.
To remove trailing spaces and tidy everything at once, Word also has Find and Replace with wildcards: enable “Use wildcards,” search for {2,} (a space followed by {2,}), and replace with a single space to collapse any run in one pass.
How to remove extra spaces in Google Docs
Google Docs has no built-in “remove double spaces” button, but there are two routes:
- Find and replace with regex: Open Edit → Find and replace, tick Match using regular expressions, search for
+(a space followed by a plus sign, meaning “one or more spaces”), and replace with a single space. - Manual find-and-replace: Without regex, replace two spaces with one and repeat until none remain, exactly as in Word.
If your text originally came from Google Docs, you may also be fighting copied formatting — the same cleanup that removes spaces often needs to strip line breaks too, covered in how to remove line breaks from text.
How to remove extra spaces in Excel and Google Sheets
Spreadsheets have a dedicated function for this: TRIM.
=TRIM(A1) removes leading and trailing spaces and collapses internal multiple spaces down to single spaces — exactly what you want for cleaning a column of imported data.
| Method | What it does | Best for |
|---|---|---|
=TRIM(A1) | Removes leading/trailing + collapses internal spaces | Cleaning data columns |
=SUBSTITUTE(A1," ","") | Removes all spaces | Stripping spaces entirely |
=CLEAN(A1) | Removes non-printing characters | Data with hidden control characters |
A common gotcha: TRIM doesn’t remove non-breaking spaces (character 160) that come from web pages. To handle those, wrap it: =TRIM(SUBSTITUTE(A1,CHAR(160)," ")).
A general find-and-replace recipe
Whatever editor you’re in, this two-step sequence handles almost everything:
- Collapse runs of spaces. Replace
(two spaces) with(one), repeating until zero — or use the regex+→for a single pass. - Trim line edges. With regex, replace
^ +and+$(leading and trailing spaces) with nothing.
If you find yourself doing this repeatedly across documents, that’s exactly the friction the text cleaner removes — it bundles the whole recipe into one button.
Clean text is part of a bigger workflow
Removing extra spaces is usually one step in tidying messy text. Once the spacing is fixed, you might also want to:
- Remove duplicate lines from a list — see how to remove duplicate lines.
- Sort the lines alphabetically — see how to alphabetize a list.
- Strip line breaks that turned one paragraph into many — see how to remove line breaks from text.
These cleanup tasks pair naturally, which is why the text cleaner, duplicate line remover, and remove line breaks tools sit side by side.
The bottom line
Extra spaces — doubles, leading, trailing, tabs, and non-breaking spaces — break searches, misalign layouts, and make documents look unpolished. In Word and Google Docs, use find-and-replace (with regex + → for a one-pass fix); in Excel and Sheets, use =TRIM(), wrapping it with SUBSTITUTE(...,CHAR(160)," ") for stubborn non-breaking spaces. For the fastest path, paste your text into the text cleaner, which collapses, trims, and normalizes whitespace in a single click.
Frequently Asked Questions
How do I remove double spaces in Word?
Open Find and Replace (Ctrl + H), type two spaces in “Find what” and one space in “Replace with,” then click Replace All repeatedly until Word reports zero replacements. Each pass only halves runs of spaces, so three or more passes may be needed — or use a wildcard search for {2,} to fix it in one pass.
How do I remove extra spaces in Excel?
Use the TRIM function: =TRIM(A1) removes leading and trailing spaces and collapses multiple internal spaces into single ones. For non-breaking spaces from web data, use =TRIM(SUBSTITUTE(A1,CHAR(160)," ")).
What is the fastest way to remove extra spaces?
Paste the text into a dedicated tool like the text cleaner, which collapses multiple spaces, trims line edges, and removes empty lines in one click — no formulas or repeated find-and-replace passes required.
How do I remove trailing spaces I can’t see?
Trailing spaces at the end of lines are invisible but easy to remove with a regular-expression find-and-replace: search for +$ (one or more spaces before a line end) and replace with nothing. The text cleaner trims them automatically.
Why won’t TRIM remove all the spaces in my data?
TRIM doesn’t remove non-breaking spaces (ASCII character 160), which commonly come from copied web pages and PDFs. Combine it with SUBSTITUTE to convert those first: =TRIM(SUBSTITUTE(A1,CHAR(160)," ")).
Should I use one space or two after a period?
Modern style guides — including Chicago, AP, and MLA — all call for a single space after a period. The two-space convention is a holdover from typewriters. A quick find-and-replace of double spaces with single ones brings older documents up to date.