Skip to content

How to remove line breaks in Google Docs

Google Docs has no built-in way to swap line breaks for spaces: Google's help says special characters like \n typed into Replace with work only in Google Sheets. The reliable fix is to clean the text first, then paste it back with Ctrl+Shift+V. For a handful of breaks, delete them by hand.

Remove line breaksUpdated 3 min read

Clean the text and paste it back

This works for any amount of text, and it's the best fix for text pasted from a PDF or an email.

  1. In your document, select the text with the unwanted breaks and copy it (Ctrl+C, or ⌘+C on a Mac).
  2. Paste it into the box below. It opens in keep-paragraphs mode: blank lines between paragraphs stay, and the breaks inside each paragraph become spaces.
  3. Leave Rejoin words split with a hyphen ticked if the text came from a PDF, so "infor-" and "mation" become "information" again.
  4. Copy the result.
  5. Back in Docs, with the original text still selected, press Ctrl+Shift+V (or ⌘+Shift+V on a Mac) to paste without formatting. The cleaned text replaces the selection and takes on the style around it.

Remove line breaks

Open the full tool

If you want everything on a single line, choose Remove all instead. To turn a list into one line with commas between the items, choose Replace with… and keep the comma.

Remove a few breaks by hand

For two or three breaks, editing directly is quicker:

  1. Click at the very start of the line that should join the one above.
  2. Press Backspace. The line moves up to the end of the previous one.
  3. If the two words now touch, type a space.

On a Mac, the key is Delete.

Why Find and replace doesn't do it

Docs' Edit > Find and replace supports regular expressions when you tick Match using regular expressions. But Google's help is explicit about replacements: regex formatting and special characters such as \n in the Replace with field only work in Google Sheets. In Google Docs, whatever you type there is inserted as literal text, so you'd get the characters \n in your document instead of a line break.

That's why the copy, clean and paste approach above is the dependable one.

Gaps that aren't line breaks

Sometimes the space between paragraphs isn't an empty line at all:

  • Paragraph spacing. Select the paragraphs, then open Format > Line & paragraph spacing and look at the spacing options. Space added before or after a paragraph looks just like a blank line.
  • Line spacing. Lines inside a paragraph spread out when line spacing is set to double. Choose single in the same menu.
  • Page breaks. A page break pushes text to the next page. Click just after it and press Backspace.

Do it in Google Sheets instead

If your text is in a spreadsheet cell, Sheets' Find and replace can handle line breaks, because Google's help says regex replacements work in Sheets. Tick Search using regular expressions, search for \n, and replace with a space or a comma. Check the result on a copy of the sheet first.

Tips

  • Turn on Rejoin hyphenated words only for text from a PDF or a printed source. In normal text, a hyphen at the end of a line is rare.
  • Pasting with Ctrl+V brings the source's fonts and colours with it. Use Ctrl+Shift+V so the cleaned text matches your document.
  • Keep the original until you've checked the result. Ctrl+Z undoes the paste if something looks wrong.

Sources

Questions

Can Find and replace remove line breaks in Google Docs?

Not reliably. Google's help says special characters such as \n in Replace with only work in Google Sheets; in Docs they're inserted as literal text. Clean the text outside Docs and paste it back.

How do I paste text into Google Docs without the formatting?

Press Ctrl+Shift+V on Windows or ChromeOS, or ⌘+Shift+V on a Mac. It drops fonts and colours, but it keeps the line breaks.

Why is there a big gap between my paragraphs?

It may be paragraph spacing rather than an empty line. Select the paragraphs and check Format > Line & paragraph spacing.