How to Extract Text From a PDF

5 min read

Copying text out of a PDF by hand usually goes badly. Line breaks land in the wrong places, columns interleave into nonsense, and a long document is impossible to do page by page.

This guide explains why that happens, how to extract the whole document cleanly in one step, and how to handle the case where the PDF turns out to contain no real text at all.

1. Why copy and paste mangles PDF text

A PDF does not store paragraphs. It stores individual glyphs with coordinates — this character at this position, in this font, at this size. What looks like a flowing paragraph on screen is really a set of positioned marks that your eye assembles into lines.

When you select and copy, the viewer has to guess how those marks group into words, lines and paragraphs. It usually guesses adequately for a simple page and badly for anything with two columns, a header, a footer or a sidebar — which is why pasted text so often arrives with a page number wedged into the middle of a sentence.

2. Extract the whole document at once

The PDF to Text tool reads the embedded text directly out of the document structure rather than scraping what is on screen, and returns it in reading order with page markers so you can see where each page began.

It handles up to five files at a time and gives you a .txt per document, or all of them as a ZIP. For anything longer than a page or two this is both faster and considerably cleaner than manual copying.

Try the tool: PDF to Text

3. Understand what you get back

You get the words in reading order, not a visual reproduction. Columns are flattened into sequence, and tables come out as runs of text rather than as a grid — because the grid was never stored in the file, only the positions of the characters that make it look like one.

For the usual reasons people extract text — searching it, quoting it, feeding it into another document, counting the words, analysing terminology — this is exactly what you want. If you need editable formatting instead of raw text, convert to Word; if you need the images, extract those separately.

  • Need raw text to search or quote → PDF to Text
  • Need an editable document → PDF to Word
  • Need the pictures → PDF Image Extractor
Try the tool: PDF to Word

4. When nothing comes out

If extraction returns an empty file, the PDF is a scan: every page is an image, and there are no characters in the file to extract. This is normal for anything that came from a scanner, a fax or a phone camera.

Those documents need optical character recognition, which reads the shapes of the letters and reconstructs the text. Run the PDF OCR tool on them instead.

A different failure is a password-protected file, which cannot be read until it is unlocked. Remove the protection first with the PDF Unlock tool, then extract.

Try the tool: PDF OCR

Tools used in this guide

FAQ

The PDF is a scan — pictures of text with no embedded characters. Use the PDF OCR tool, which recognises the letters visually.

No. Text comes out in reading order with page markers. Exact visual layout, columns and table grids are not reconstructed, because a PDF does not store them as such.

Not directly. Remove the protection with the PDF Unlock tool first, then extract.

No. The PDF is parsed in your browser and the text never leaves your device.