Files are processed in your browser, not uploaded. Privacy →
Skip to guide

Extract text

Extract text from PDFs: copy, export and fix the output

By DeckleUpdated

To extract text from a PDF, open PDF to text, choose your file, pick which pages to include and how pages are separated, then choose Extract text. You get a UTF-8 TXT file named after your PDF, with the words from every selected page in the order you set. It reads the text that is already in the PDF, so a scanned page with no selectable text needs OCR first. Your PDF is not changed.

PDF to text

Pages become plain text

Selected PDF pages

Order chosen in the review

UTF-8 text

Words without page formatting

Page boundary: U+000C or a blank line

Conceptual illustration · page separators retain boundaries, not columns, fonts or table geometry.

Find the right guide

What you want to do Start here
Get all the text out of a PDF as a TXT file How to extract text from a PDF
Copy a paragraph or two into an email or document How to copy text from a PDF
Take text from a few pages only, or in a new order How to extract text from specific PDF pages
Paste PDF text into Word or Google Docs How to get text from a PDF into Word or Google Docs
Count the words in a PDF How to count the words in a PDF
Keep a marker where each page ended How to add page breaks to extracted PDF text
The TXT file came out empty Why is my PDF to text file empty?
Some pages have text and some do not Why is text missing from some pages?
Columns or sidebars come out mixed together Why is extracted PDF text in the wrong order?
The text has boxes, symbols or nonsense letters Why does extracted PDF text show garbled characters?
Decide between a TXT file and a searchable PDF PDF to text vs OCR

Check that the PDF has text to extract

PDF to text reads the text layer: the characters the PDF stores alongside what you see. Most PDFs exported from Word, Google Docs, a browser or an accounting system have one. A scan or a photo saved as PDF usually does not; each page is a picture of words.

The quick test is to open the PDF in any viewer and try to select a sentence. If the words highlight one by one, the page has selectable text and PDF to text can read it. If dragging draws a box over the whole page, or nothing highlights, the page is an image. Try this on more than one page, because a single PDF can mix typed pages and scanned ones.

For a scan, the text has to be recognised first with OCR (optical character recognition). Native PDF text vs OCR text explains the difference and why OCR text needs checking.

What the TXT file contains

Kept Not kept
Words, numbers and punctuation from selectable text Fonts, sizes, bold and italics
Line breaks where lines change on the page Images, charts and drawings
Accented letters and other scripts, saved as UTF-8 Table grid lines and cell alignment
A page-break character or blank line between pages Links, form fields and comments
Your chosen page order Headers and footers as separate items

Text comes out in the order the PDF stores it. For a simple letter or report this matches the reading order. For a newsletter with columns or a form with text boxes, check the result; what PDF to text keeps and what it leaves out covers these cases in detail.

Options on the PDF to text screen

  • Pages and order: All pages exports everything in page order. Choose pages opens Page numbers in output order, where you type pages such as 3, 1-2. The text follows the order you type, and a page typed twice appears twice. Up to 1,000 entries.
  • Between pages: Mark where each page ended puts a form-feed (page-break) character between pages. One continuous document separates pages with a blank line.

A sentence under Pages and order restates what will happen, such as "12 pages will be exported in page order", so you can check before you start. The Undo, Redo and Reset buttons step back through your choices or return to the defaults.

After extraction the result screen says how many pages were read for their text and shows a preview of the file. When the whole text fits in the preview, a Copy text button copies it without downloading anything. A Verified: line reports how much of the PDF's selectable text appears in the file. A PDF with no text layer is reported as having no selectable text to compare, rather than a score.

Frequently asked questions

Can I extract text from a scanned PDF?

Not directly. A scan is a picture of the page, so it needs OCR to create a text layer first. Once the PDF has selectable text, PDF to text can export it.

Is the formatting kept?

No. A TXT file holds characters and line breaks only. Bold, fonts, columns and tables are not kept, so expect to tidy headings and tables after pasting.

Does Deckle upload my PDF to extract the text?

No. PDF to text runs in your browser and reads the file on your device. The page itself loads over the internet, but the PDF is not sent to a server.

Can I extract text from a password-protected PDF?

Not while it is locked. The button explains that the PDF must be unlocked first. Use Unlock PDF with the password, then extract the text from the unlocked copy.

  • PDF to text to save selectable PDF text as a TXT file
  • Unlock PDF to remove a known password before extracting
  • Split PDF to keep only the pages you need as a separate PDF
  • PDF to JPG to save pages as images when you need the look, not the words

Sources