Guide

How to fix text copied from a PDF

When you copy text out of a PDF, you often get a line break every few words, words split with hyphens, and odd spacing. Here's why that happens and how to clean it up in seconds.

Why PDF text comes out broken

A PDF is designed to look the same everywhere, like a printed page. Inside the file, text is usually stored as positioned lines rather than flowing paragraphs. Each line of the layout is placed separately, so when you copy it, your computer often adds a hard line break at the end of every line. The result is text that looks like this:

The committee reviewed the pro-
posal in detail and agreed that
further work was needed before
a final decision could be made.

Other common problems:

  • Hyphenated words split across two lines (“pro- posal”).
  • Extra spaces from justified text, where the layout stretched the gaps between words.
  • Headers, footers and page numbers mixed into the middle of paragraphs.
  • Special characters: curly quotes, long dashes and ligatures, where “fi” or “fl” is stored as a single character, which can turn into strange symbols when pasted.
  • Columns read across instead of down, mixing two columns of text together.

The fast fix

  1. Copy the text from the PDF and paste it into the text cleaner.
  2. Tick Fix broken lines. This joins lines within each paragraph, keeps the blank lines between paragraphs, and mends words that were split with a hyphen.
  3. Keep Remove extra spaces and Trim spaces ticked.
  4. If you're pasting into code, a spreadsheet or a system that garbles symbols, tick Straight quotes and plain dashes too.
  5. Copy the result.

Then skim the text for page numbers, running headers and footnote numbers, which no automatic tool can reliably tell apart from real content.

If paragraphs run together

Some PDFs don't leave a blank line between paragraphs, so fixing broken lines joins everything into one huge paragraph. Before cleaning, add a blank line wherever a new paragraph should start (usually after a line that ends with a period and is noticeably shorter than the others), then run the clean-up.

Doing it in Microsoft Word

You can fix line breaks with Word's Find and Replace:

  1. Press Ctrl+H (or Cmd+Shift+H on a Mac).
  2. Replace ^p^p with a placeholder that won't appear in your text, such as ##. This protects real paragraph breaks.
  3. Replace ^p with a single space. This removes the line breaks inside paragraphs.
  4. Replace ## with ^p to restore the paragraphs.
  5. Replace two spaces with one, and repeat until no more are found.

Avoiding the problem

  • Open the PDF in Word. Word can convert many PDFs into an editable document (File → Open, then pick the PDF), keeping paragraphs intact.
  • Ask for the source file. If the PDF was made from a Word document or web page, the original will copy cleanly.
  • Scanned PDFs are images, not text. You'll need optical character recognition (OCR), which is built into many PDF readers and into Google Drive: right-click the PDF and choose Open with → Google Docs.

Check nothing was lost

If accuracy matters, for a quotation or a legal document say, paste the original and the cleaned version into the text difference checker with Ignore extra spaces ticked. Any real change in wording will stand out.

Try the tools

More guides