Google Analytics helps us understand which tools you use and which actions work. Your files and entered text stay out of analytics.

How to extract text from a PDF

Choose the right source for the words, then check what the conversion left behind.

Free toolPDF to TextRead PDF pages beside their editable text. Clean up line breaks, read scans with OCR and save the words.Extract your PDF text

The short answer

Extract the embedded text first. Use OCR when the page is a picture without a usable text layer.

For a short quote, select and copy in your PDF reader. For a whole document, use a converter with page review. Save a copy of the original so you can check names, numbers and reading order.

Find out what kind of PDF you have

Try selecting a word in a PDF reader. Selection is a useful clue, though an existing OCR layer can still contain mistakes.

What you seeWhat to try
Words select and copy correctlyExtract embedded text. OCR adds work and may introduce recognition mistakes.
The whole page behaves like a pictureUse OCR with the correct language, then review the transcript.
Some pages copy, others do notExtract text first, then OCR only the missing pages.
Text selects but copies as nonsenseTry another reader. The file’s font mapping or earlier OCR may be faulty.

Choose a method for the task

A full converter is useful when copying a few words by hand would become repetitive. Small tasks often need less.

MethodBest useCheck afterwards
Copy in Preview, Acrobat Reader or a browser PDF viewerA paragraph from a text-based PDFColumns, omitted lines and copied headers
floi PDF to TextReview and edit pages locally before saving TXT or MarkdownReading order, line joins and OCR spelling
Adobe Acrobat or another desktop OCR applicationRepeat work, difficult scans or replacing an existing faulty text layerEdition, language support and whether processing uses a cloud service
Poppler’s pdftotextLocal scripts and repeatable text extractionMissing text layers; it does not perform OCR

Extract text from the command line

Poppler’s pdftotext extracts existing PDF text. Install Poppler through your operating system’s package manager, then run:

pdftotext -enc UTF-8 report.pdf report.txt
pdftotext -layout -f 3 -l 5 report.pdf selected-pages.txt

-layout tries to preserve physical spacing. It can help with simple columns, but its spaces do not become spreadsheet cells. -f and -l set the first and last PDF page positions.

The Poppler manual describes the options and font-encoding limits. For a scanned document, run an appropriate OCR workflow first.

Fix broken lines without losing meaning

Join lines only after checking whether a break separates prose or a meaningful item. An address, poem or list may need those boundaries.

Extracted textPossible correctionRisk
docu- followed by mentdocumentA genuine compound word may need its hyphen.
One sentence wrapped over three linesJoin with spaces.A heading and body may join if there is no blank line.
A repeated running headerRemove it while reviewing each page.Repeated words can also be part of the document.

Try the worked sample

The three-page synthetic sample contains two text pages and one scanned page. Its source is generated with scripts/generate-pdf-text-sample.mjs, dated 17 October 2026.

  1. Open it in PDF to Text. Page 1 contains the split word docu- followed by ment.
  2. Enable Join words split by a hyphen. Check that the result reads document.
  3. Move to page 3. Its visible words need OCR because they are an image.
  4. Select page 2 only. Save text should contain its project details without the other pages.

In a Chrome check on macOS on 17 October 2026, pages 1 and 2 extracted immediately. Page 3 needed OCR. Saving only page 2 with Keep line breaks produced 236 bytes of UTF-8 TXT, or 247 bytes of Markdown with its page heading. These figures describe this sample, not your document.

Why columns and tables need review

A PDF stores where content is drawn. It may not describe the order in which you should read it.

A creator can write the left column first, then the right. Another can write both columns one row at a time. An extractor may follow that internal sequence even when the page looks identical.

  • Compare the first few paragraphs with the original before trusting a long export.
  • Inspect amounts beside their labels. A row of numbers can survive while its relationships disappear.
  • Keep page markers when you will need to trace a quotation back to its source.

Save words or keep the PDF?

Save TXT when you want the words alone. Make a searchable PDF when the page’s appearance still matters.

Searchable PDF adds a text layer while keeping the page image. Read the searchable PDF guide for the difference between a picture of a word and a selectable word.

Frequently asked questions

Why does a PDF look readable but copy as nonsense?

The visible font shapes and the mapping to text characters are separate. A broken or missing character map can produce the right picture and the wrong copied words. Try another reader. For a scan, use OCR. A damaged existing text layer may need a desktop tool that can replace it.

Should I use TXT or Markdown for extracted PDF text?

Use TXT when you need only the characters. Use Markdown when page headings will help you navigate or cite the output. Neither format preserves the PDF layout automatically.

↑↓ move↵ openesc close