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
| Option | Fixes |
|---|---|
| Line breaks (Shift+Enter) become spaces | Soft breaks inside a paragraph, common in email |
| Empty lines: Remove extra (keep one) or Remove all | Blank lines between every paragraph |
| Double spaces between words | Two or more spaces between words |
| Spaces at the start and end of lines | Leftover indentation and trailing spaces |
| Invisible characters | Non-breaking spaces, zero-width spaces and soft hyphens that break search and spacing |
| Space before , . ; : ! ? | "word ," becomes "word," |
| Quotes: Make straight or Make curly | A mix of " and curly quotes |
| Remove duplicate lines | Paragraphs that repeat an earlier one |
Tick any mix. They run in one pass, and the preview shows every change.
Steps
- Paste the text into your Doc.
- Select it, or plan to choose This tab only or Whole document under Where.
- Open Extensions, Tidywell, Clean up text.
- Tick the fixes you want. For PDF text, Join lines broken mid-sentence and Empty lines: Remove extra usually do most of the work.
- Press Preview clean-up. Removed characters show in red, added ones in green. Untick a paragraph to leave it as it is.
- 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
- How to write chemical equations in Google Docs (Texwell)
- How to add code to Google Slides (Syntaxwell)
- How to add audio to a Google Form (Remarkwell)