← Back

PDF Text Extract

Extract all text from a PDF, copy or download as txt

This tool can only extract real text that already exists in the PDF. If it's an image-based PDF from a scanner (with no selectable text layer), text can't be extracted — you'll need a dedicated OCR tool for that. Everything is processed locally in your browser; your file is never uploaded.

About PDF Text Extract

This tool reads the text that already exists inside a PDF and shows it page by page on the screen. You can copy everything with one click or download it as a .txt file. It reads the PDF's text layer rather than using image recognition (OCR) to look at the page, so it works on PDFs exported directly from Word, a web page or similar software. Scanned or photographed PDFs contain no real text and need an OCR tool first. The output is plain text: tables, fonts, images and layout are not preserved.

How to use it

  1. Click the dashed box that says Click to select a PDF file and choose a PDF. Processing starts immediately with no further button, and the message Extracting text… shows while it runs.
  2. When it finishes, the Extracted result area lists all the text. Each page is introduced by a separator line such as --- Page 1 ---, so you can match it to the original page number.
  3. Click Copy all at the top right to put all the text on your clipboard. The label briefly changes to Copied.
  4. To keep it as a file, click Download .txt, which saves extracted-text.txt.
  5. The result box has a limited height, so scroll inside it when there is a lot of text.

A real extraction example

The output below was produced by the same text-reading library the page uses, pdf.js, on a small test file we generated. It has three pages. Page 1 contains the two lines Invoice Summary and Total due: 120 USD. Please pay the invoice. Page 2 contains Appendix and No invoice here? Invoice again. Page 3 is blank. The result was: under page 1, two lines, Invoice Summary and Total due: 120 USD. Please pay the invoice.; under page 2, two lines, Appendix and No invoice here? Invoice again.; and for page 3 only the separator, with nothing after it. As you can see, the original line breaks are kept, and a blank page leaves only its marker (the scanned-PDF warning appears only when no page at all yields text).

Limits and known quirks

  • Only a real text layer can be extracted. Image-only PDFs, such as scans or screenshots saved as PDF, yield no text.
  • If no text at all is found in the whole file (a typical scan), the page shows a red message saying no text could be extracted and suggesting an OCR tool. If only some pages are images, those pages just show their separator with nothing after it.
  • Line breaks follow the line-end markers recorded in the PDF, but paragraph structure is not specially preserved. No extra spaces are inserted next to Chinese, Japanese or Korean characters, and a single space is added between other fragments. A PDF with irregular line-end markers may break lines differently from the original.
  • Tables come out as a stream of text and the relationship between columns is lost.
  • Password-protected and damaged files cannot be read and trigger the error message described above.
  • Very long or very large files are slow because the whole file is processed in browser memory.
  • If a font in the PDF has no proper character mapping, the extracted text may be garbled or missing characters. That comes from the file itself.

Why is my result empty?

The most common cause is that the PDF is a scan or photo, so each page is really an image. Try selecting text on the page in a viewer; if you cannot, that is almost certainly the situation and you need an OCR tool. Occasionally text has been converted to vector outlines, which looks the same.

Is the text in the right order?

The tool outputs text in the order it is stored inside the PDF. For single-column documents exported from word processors this usually matches reading order. In multi-column layouts, text boxes, headers and footers, the internal order depends on the program that created the file and may differ from what you see, so check it.

Can I quote the extracted text directly?

Check it against the original first. Handling of spaces and line breaks, font mapping and hyphenation can introduce small differences. For important uses such as contracts, legal or financial documents, treat the original PDF as the authority.

How is this different from PDF to Word?

This tool gives you plain text with no formatting. If you want paragraphs and styles kept as far as possible, look at the PDF to Word tool on this site. For quickly copying, searching or counting text, this one is more direct.

Privacy and processing

The file you choose is read in your browser, and the extraction is done by the bundled pdf.js component. The page contains no code that uploads the file or the extracted text. The text only appears on the current page and a file is created only when you click Download .txt. Nothing is kept after you refresh.