How to fix broken line breaks in text copied from a PDF

You copy a paragraph from a PDF, paste it into an email or document, and every line stops halfway across the page. It happens with PDFs, some emails and text copied out of old documents and websites. Here’s why, and how to clean it up in seconds.

Why PDF text breaks mid-sentence

A PDF describes where each piece of text sits on a page, not how the text flows. There is no concept of a paragraph that re-wraps to fit a window. When you copy from a PDF, most viewers place a line break wherever a line ended on the page. Your paste then keeps those breaks, so the text is chopped into lines the width of the original column.

You may also see extra problems from the same cause:

  • words split with a hyphen at the end of a line (“docu-” / “ment”);
  • double spaces or spaces at the start of lines;
  • page headers, footers and page numbers mixed in with the text.

The quick fix

  1. Paste the text into Wordformat’s Remove Line Breaks tool.
  2. Keep paragraph breaks if your text has blank lines between paragraphs. The tool joins the lines within each paragraph and leaves the gaps between paragraphs alone.
  3. Copy the result and paste it where you need it.

The text is processed in your browser, so it’s safe to use with private documents.

Tidying up the rest

  • Extra spaces: run the result through the Whitespace Remover to collapse double spaces and trim spaces at the start and end of lines.
  • Hyphenated words: search for “- ” (a hyphen followed by a space) and check each match. Words split by the page layout, such as “docu- ment”, should be joined. Real hyphenated words such as “long-term” should be left alone, which is why it’s worth checking rather than replacing all at once. Wordformat’s Find and Replace tool makes this quick.
  • Repeated headers and footers: if the same line (a document title or “Confidential”) appears on every page, the Duplicate Line Remover can strip the repeats before you join the lines.

Doing it in Word

If you’d rather stay in Microsoft Word, Find and Replace can do the same job with special characters:

  1. Press Ctrl+H. Replace ^p^p (two paragraph marks, a real paragraph break) with a placeholder such as ###.
  2. Replace ^p (the remaining single line ends) with a space.
  3. Replace ### with ^p to restore the paragraph breaks.

It works, but you have to remember the steps every time, and it gets confused if your paragraphs aren’t separated by blank lines.

Avoiding the problem

  • If you have the original Word or Google Docs file, copy from that instead of the PDF.
  • Some PDF readers copy text more cleanly than others, so try a different viewer (for example, your browser’s built-in PDF viewer versus a desktop app).
  • For long documents, converting the PDF to a Word file keeps paragraphs together better than copying and pasting.