How to remove line breaks from pasted text in Google Docs

By Jake Marsh · Updated

Text copied from a PDF or an email often lands in Google Docs with a paragraph break at the end of every line. To remove those line breaks, select the text, open Extensions, Tidywell, Clean up text, tick Join lines broken mid-sentence (text pasted from a PDF or email), press Preview clean-up, then Apply. Broken lines are joined into whole paragraphs, and real paragraph breaks stay.

How Tidywell tells a broken line from a real paragraph

A line is joined onto the one before it when the line before doesn't end a sentence and the next line starts in lowercase. Words split with a hyphen at the end of a line, like "infor-" and "mation", are put back together. A line that ends with a period and a line that starts with a capital letter are left as separate paragraphs, so headings and real paragraph breaks survive.

The other things pasted text brings with it

OptionFixes
Line breaks (Shift+Enter) become spacesSoft breaks inside a paragraph, common in email
Empty lines: Remove extra (keep one) or Remove allBlank lines between every paragraph
Double spaces between wordsTwo or more spaces between words
Spaces at the start and end of linesLeftover indentation and trailing spaces
Invisible charactersNon-breaking spaces, zero-width spaces and soft hyphens that break search and spacing
Space before , . ; : ! ?"word ," becomes "word,"
Quotes: Make straight or Make curlyA mix of " and curly quotes
Remove duplicate linesParagraphs that repeat an earlier one

Tick any mix. They run in one pass, and the preview shows every change.

Steps

  1. Paste the text into your Doc.
  2. Select it, or plan to choose This tab only or Whole document under Where.
  3. Open Extensions, Tidywell, Clean up text.
  4. Tick the fixes you want. For PDF text, Join lines broken mid-sentence and Empty lines: Remove extra usually do most of the work.
  5. Press Preview clean-up. Removed characters show in red, added ones in green. Untick a paragraph to leave it as it is.
  6. Press Apply.

Why find and replace doesn't fix it

Google Docs' find and replace can't search for paragraph breaks, so it can't join lines. Replacing every break would also merge real paragraphs. Joining only the lines that break mid-sentence is the part that needs a rule.

What it costs

Tidywell is $4.99 a month or $44 a year per Google account. Free trial: 15 Apply runs or 14 days, whichever comes first. No card needed. Every plan and the install link are on the Tidywell page.

Tidywell: Sort, Change Case & Clean Up Text

Sort lines, lists and tables, change case and clean up text in Google Docs, with a preview of every change and Undo $4.99 a month or $44 a year per Google account.


Questions

Will this remove my formatting?

No. Bold, italics, links, colors and fonts are kept.

Can I undo it?

Yes. Press Undo right after, or use History later. Undo puts back removed and joined paragraphs.

What about lines that start with a capital, like names?

A line starting with a capital letter isn't joined, since it usually starts a new sentence. Untick it in the preview, or join those few by hand.

Does it work on text in tables?

Yes. Clean-up covers paragraphs inside tables, headers, footers and footnotes as well as the body.


More Tidywell guides


More Google guides