How to Copy Text From a PDF Without Broken Lines or Gibberish

Why copying text out of a PDF often gives broken lines, missing spaces or nothing at all, and how to extract clean, page-by-page plain text instead.

Updated September 29, 2026 5 min read

Use the free PDF to TextExtract plain text from a PDF, page by page

You select a paragraph in a PDF, paste it into an email, and get a mess: every line ends with a hard break, words run together, or the columns of a two-column layout are interleaved line by line. Sometimes the selection tool will not highlight anything at all. Anyone who has quoted a report, filled in a form from a PDF invoice or moved a policy document into a wiki has hit this.

This guide explains why PDFs behave this way, shows how to pull out clean text page by page, and covers the command-line and desktop alternatives, including what to do when the PDF is really just a scanned picture.

Why PDF text is awkward to copy

A PDF is built for printing, not editing. Internally, a page does not contain "paragraphs". It contains instructions such as "place these characters starting at x = 72, y = 540 in this font". A sentence may be split into several such pieces, and nothing in the file says that the end of one line continues on the next.

When you copy text, your viewer has to guess the reading order and where the spaces and line breaks go. That guess goes wrong in predictable ways:

  • Hard line breaks appear at the end of every printed line, because each line was placed separately.
  • Missing spaces happen when the PDF positions words with a gap instead of storing a space character.
  • Scrambled columns occur when the viewer reads straight across a two-column page.
  • Odd symbols appear when a font uses a custom character mapping, so the file does not say which real letter each glyph represents.
  • No text at all means the page is an image, typically a scan or a phone photo saved as PDF.

A dedicated extractor avoids some of these problems by grouping characters that sit on the same line and ordering lines from top to bottom, giving you text that is much easier to work with.

Extract text with our browser tool

Our PDF to Text tool reads the text layer of the PDF inside your browser; the file is not uploaded.

  1. Open PDF to Text and drop in your PDF. If it is password protected, type the password when asked.
  2. In Pages, type the pages you need, for example 2-4, 7, or leave the field empty to extract the whole document.
  3. Leave Add page separators switched on if you want a ----- Page 3 ----- marker before each page. This makes it easy to cite page numbers later. Switch it off for one continuous block of text.
  4. Click Extract text.
  5. The result appears in an editable box, with a live word and character count underneath. Fix anything you like directly in the box.
  6. Click Copy text to put it on your clipboard, or Download .txt to save a plain text file.

If some pages come back empty, the tool tells you which ones. That almost always means those pages are scanned images, which leads to the next section.

When the PDF is a scan: you need OCR

Text extraction only works when the PDF actually contains characters. A scanned contract or a photo of a receipt contains a picture of letters, which is no different to the computer than a picture of a landscape. To turn that into text you need optical character recognition (OCR).

A practical route is:

  1. Convert the pages to images with PDF to JPG at 300 DPI for the best recognition.
  2. Run each image through Image to Text, which performs OCR.
  3. Proofread the result carefully. OCR can confuse similar characters such as 0 and O, or 1 and l, and it can misread figures in tables, which matters for amounts and account numbers.

Other ways to get text out of a PDF

Copy and paste from a PDF reader

For a sentence or two, selecting and copying in your PDF reader is fine. Most readers let you hold a modifier key to select a rectangular area, which can help with columns. For whole documents it becomes slow and error-prone.

pdftotext on the command line

The Poppler utilities include pdftotext, which is excellent for batch jobs:

pdftotext -layout statement.pdf statement.txt

The -layout flag tries to keep the physical arrangement of columns and tables using spaces, which is useful for statements and reports. Without it, you get a simpler reading-order output. If you process many files, this is the better tool.

Opening the PDF in a word processor

Microsoft Word and Google Docs can open a PDF and convert it into an editable document. That keeps some paragraph structure, but it can also shuffle layout and introduce text boxes. If you want an editable document rather than plain text, our PDF to Word tool is designed for that.

Tips for cleaner results

Joining broken lines

Plain text keeps one printed line per line. If you need flowing paragraphs, paste the text into a tool such as Remove Line Breaks to join lines while keeping blank lines between paragraphs.

Multi-column layouts

If a newsletter or academic paper comes out in a strange order, extract one page at a time and check the sequence. For heavily designed layouts, it can be quicker to copy each column separately from your reader.

Counting and checking

The word count under the result is useful for translation quotes or submission limits. For deeper analysis, paste the text into the Word Counter.

Garbled characters

If the output contains random symbols in place of letters, the font in the PDF lacks a proper character map. No extractor can fix that reliably; OCR on a rendered image is the workaround.

Frequently asked questions

Why can't I select any text in my PDF?

The page is probably an image, such as a scan or photo saved as PDF. There is no text layer to select, so you need OCR to recognise the letters.

Does extracting text keep the formatting?

No. Plain text contains only characters and line breaks. Fonts, bold, colours, images and table borders are not included. Use PDF to Word if you need headings and paragraphs in an editable document.

Can I extract text from a password-protected PDF?

Yes, if you know the password. The tool asks for it when you open the file. Without the password the content cannot be read.

Why are there line breaks in the middle of sentences?

PDFs store each printed line separately. The extractor keeps those line endings so the text matches the page. Join them afterwards if you need continuous paragraphs.

Is the text extracted on my device?

Yes. The PDF is opened and read in your browser, and the text is produced locally.

Try it now: PDF to Text

Loading tool…