← Back to the tool

How to Remove Extra Spaces in Google Docs

Google Docs text picks up extra spaces the same way any pasted text does: typing habits, and pasting from email or a webpage. This guide covers Google Docs' own fix for double spaces, what its Find and Replace can't do safely on its own, and one trap that catches people who think it isn't working.

Find and Replace for double spaces

Open Find and Replace, search for two spaces, and replace with one space:

Ctrl+H (Cmd+Shift+H on Mac) → Find: two spaces → Replace with: one space → Replace All

Click Replace All again after it finishes. Google Docs pairs up spaces two at a time, so a run of three or more spaces needs more than one click. Keep clicking Replace All until it reports no more replacements. That's the sign the job is done.

Skip the manual steps. Clean your text instantly, right here.

Clean it instantly with the free tool

Spaces at the start or end of a line

Find and Replace matches exact text, not where that text sits on a line. There's no simple built-in search for "the start or end of every line." This is the case where pasting your text into the free tool and ticking Trim edges is faster than building a search pattern by hand.

Removing blank lines

Turning on Match using regular expressions (a checkbox in the Find and Replace dialog) lets you search for a pattern instead of exact text. Searching for \n\n+ finds every run of blank lines in the document.

Ctrl+H → Match using regular expressions → Find: \n\n+

That checkbox only changes what the Find field can search for. The Replace field never accepts a search pattern, even with the box checked, so there's no way to tell it "close the gap but keep the line break." Clearing the Replace field deletes the matched line breaks entirely, which merges the paragraphs on either side of the blank lines together instead of just removing the gap. There's no clean built-in fix here. The free tool's Remove blank lines option does this safely: every blank line is deleted and every other line stays exactly where it was.

The non-breaking space trap

Text copied from a webpage sometimes contains non-breaking spaces that look identical to regular spaces but aren't matched by a plain-space search, so a double-space replace can report no matches even though gaps are still visible between words.

For a one-off cleanup, or text pasted from more than one source, running it through the free tool first is usually faster than working through the steps above by hand. It handles double spaces, blank lines, and line-start/end spaces in one paste.

Clean my text now