Why text copied from a PDF breaks into short lines

The file has no paragraphs to give you. Here is what it does have, and how to rebuild the text.

A PDF does not store paragraphs. It stores instructions of the form draw this string of glyphs at these coordinates, one for each visual line. When you copy, the viewer reconstructs a text stream and inserts a line break wherever a new drawing instruction starts — which is at the end of every line on the page. You get the words in order, chopped at 60 to 80 characters, plus hyphens where the typesetter split words.

What is actually inside the file

Open a PDF in a text editor and you will find operators like Tj and TJ that paint text, and Td or TD that move the cursor to a new position. Nothing in that sequence says this is one paragraph. A paragraph break and a line wrap look identical to the file format: both are just a move to a new y coordinate.

Copying therefore involves guesswork by the viewer. Acrobat, Chrome, Preview and Firefox all guess differently, which is why the same page pasted from two apps produces two different messes. Some viewers collapse a small vertical gap into a space and a large one into a blank line; others break every line.

Tagged PDFs — files exported with accessibility structure, usually from InDesign or Word with the right option ticked — do carry paragraph information, and copying from those works properly. Most PDFs in circulation, especially scanned or LaTeX-produced ones, are not tagged.

The fix, in the right order

  1. Remove hyphenation first. Words split across lines arrive as informa- newline tion. If you join lines before fixing this, you get informa- tion with a space you then have to hunt for. Search for a hyphen immediately followed by a line break and delete both.
  2. Protect real paragraph breaks. If blank lines survived the copy, they mark genuine paragraph boundaries. Replace each blank line with a placeholder such as @@ before the next step.
  3. Join the remaining line breaks into spaces.
  4. Restore the placeholders as paragraph breaks.
  5. Collapse double spaces and trim line ends.

Steps 2 to 5 are what a line break remover does in one paste when you only need flowing text, and a text cleaner handles the leftover double spaces. In Word, the equivalent is Find and Replace with Use wildcards off: find ^p^p, replace with @@; find ^p, replace with a space; find @@, replace with ^p. Do them in exactly that order.

Copying better in the first place

SituationBetter approach
Multi-column academic paperHold Alt (Option on Mac) and drag a rectangle to select one column at a time. Without this, the two columns interleave line by line and the text is unrecoverable.
Whole documentAcrobat: File → Export To → Rich Text or Word. It reflows paragraphs far better than a clipboard copy.
Scanned page, no text layerNothing to copy. Run OCR — Acrobat Scan & OCR, or upload to Google Drive and open with Google Docs, which OCRs automatically.
A short quoteCopy from the browser viewer rather than the desktop app; Chrome and Firefox merge lines more aggressively than Acrobat.
TablesCopy as a rectangle, then paste into a spreadsheet with Text to Columns on fixed width.

What usually goes wrong

Checking the result before you use it

Three fast checks catch nearly everything. Search for - (hyphen followed by a space) — in normal prose there should be almost none. Search for a double space. And read the last line of each page boundary, because that is where headers and footers get spliced in mid-sentence.

If you are pulling references or a list out of the document, each entry usually ends up on several lines. Join them, then remove the duplicates that appear when the same citation is repeated across pages, and sort the result.

When the PDF simply will not give you text

If selecting text selects nothing, or selects the whole page as an image, there is no text layer. That is a scan. OCR is the only route, and its accuracy depends on the scan: 300 dpi clean black-on-white gives you 98 to 99 percent character accuracy, a phone photo of a curled page gives you considerably less. Budget time for proofreading either way, and pay attention to digits — 0 and O, 1 and l are the classic OCR confusions and spellcheck will not flag them.

A second failure mode: text copies as gibberish such as ��� or random Latin letters. That means the font is embedded with a custom encoding and no ToUnicode map. No cleaning tool will help; OCR the page as if it were a scan.

Related tools

Invisible charactersYour text looks fine and behaves badly. These are the usual six culprits.Meta description lengthWhy 160 characters is a rule of thumb and 920 pixels is the real limit.Count words in Google DocsThe exact menu path in every app, and why two counters give you two different…Instagram caption lengthThe hard limit is 2,200 characters. The one that matters is the 125 you see…Extract numbersPulls every number out of a block of text, and can total them for you.Sort linesAlphabetical or reverse sorting for any list, with natural number order.Coin flipHeads or tails in one tap, with a running tally.

See all text tools →

Frequently asked questions

Why does PDF text paste with a line break on every line?

A PDF stores each visual line as a separate positioned drawing instruction, with no paragraph information, so the viewer inserts a break where each instruction ends.

How do I join broken lines back into paragraphs?

Fix hyphenated words first, protect blank lines with a placeholder, join the remaining breaks into spaces, then restore the placeholders as paragraph breaks.

How do I copy one column of a two-column PDF?

Hold Alt on Windows or Option on a Mac and drag a rectangle over the column. A normal drag selects both columns and interleaves them line by line.

Why do some words lose letters when copied?

Ligature glyphs such as fi and fl can be missing from the font mapping, so find becomes nd. Search the result for unusually short words.

Can I stop this happening at all?

Only if the PDF is tagged for accessibility. Files exported with tagging carry paragraph structure and copy cleanly; most PDFs are not tagged.

What if selecting text selects the whole page?

The page is an image with no text layer. Run OCR, for example by opening the file with Google Docs from Google Drive.