Copy the text out of a PDF — all pages or just the ones you need

Drop a PDF, choose the pages, and press Extract text to get its words in reading order, ready to copy, with a count of characters and words.

Live demo · real result from this tool

Drop your PDF here

or paste with Ctrl+V · nothing is uploaded · add several to process them in one go

For example 1-3, 5, 8- (8 to the end), odd, even or all.

Your result appears here — processed on your device.

Processed on your device — nothing is uploaded.

How to use the PDF text extractor

  1. Drop a PDF onto the box or press Choose a file.
  2. In Pages, leave all or type the pages you need, such as 2-5 or 1, 7.
  3. Keep Mark page breaks (— Page 2 —) ticked if you want to see where each page starts.
  4. Tick Keep original line breaks to keep words that are split by a hyphen at the end of a line exactly as printed.
  5. Press Extract text, then copy the result.

What it does and when to use it

Use it when you need to quote a paragraph from a report, paste a contract clause into an email, reuse the text of an old handout, or feed a document into a translator or word counter. Selecting text in a PDF reader often grabs headers, page numbers and broken lines; this tool gives you clean lines grouped into paragraphs.

For structured output, other tools read the same text differently: PDF to Markdown turns large text into headings, and the PDF table extractor aims at rows and columns.

How it works

pdf.js (the pdfjs-dist package) reads the text layer of each chosen page on your device. Each piece of text comes with a position and size. The tool groups pieces that share a baseline into lines, sorts them top to bottom and left to right, and puts a blank line where the gap between lines is clearly larger than normal, which usually marks a new paragraph.

When Keep original line breaks is off, a line ending in a lower-case letter and a hyphen is joined to the next line if that starts in lower case, so “docu-” + “ment” becomes “document”. Your file is never uploaded. If the PDF relies on standard fonts or character maps it does not contain, pdf.js may download that data from cdn.jsdelivr.net.

Worked examples

An invoice, page 1. A two-page invoice made in an office app, with Pages set to 1, gives Characters: 334, Words: 69 and Pages read: 1. The text starts:

--- Page 1 ---
Invoice 2041

Billing summary
Thank you for your order. Payment is due within 30 days of the invoice date. Late
payments may incur a fee as described in our terms of service.

The table at the bottom comes out as plain lines such as Desk lamp 1 29.99 29.99.

Same page, no markers. Untick Mark page breaks and the first line is simply Invoice 2041; the word count stays at 69, since the marker was never counted.

A scanned letter. The tool reports that no text layer was found and suggests OCR.

Limits and tips

  • Scans and photos have no text until they go through OCR.
  • Text in images, charts and form fields is not read.
  • Multi-column pages are read line by line across the page, which can mix the columns.
  • A page number outside the file gives a clear “out of range” message.

Frequently asked questions

Why does it say no text layer was found?
The PDF contains pictures of pages, not text. This is normal for scans and phone photos. Run OCR PDF first to recognise the words, then extract the text from the result.
Can I save the text as a .txt file?
This tool shows the text for copying. If you want a downloadable file, the PDF to Text tool has the same options and saves report.txt for report.pdf.
Do the page markers count as words?
No. The "--- Page N ---" markers are left out of the word count, so Words is the same whether Mark page breaks is ticked or not.
Why are some words joined or split oddly?
The tool rebuilds lines from the position of each piece of text on the page. Unusual layouts, letter-spaced headings or text set in several columns can come out in an unexpected order. Check the result against the page.
Which page formats can I type?
Single pages (4), ranges (2-5), open ranges (8- means 8 to the end), odd, even, last and all, separated by commas.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close