Skip to content
PDF to Text

How to convert a PDF to text

Updated

Contents

To convert a PDF to text, open PDF to Text, add your PDF, press Extract text, check the preview, and press Download TXT. You get the words stored in the PDF as a plain UTF-8 .txt file, without fonts, pictures or layout.

It reads only the text a PDF stores as text, the kind you can select in a viewer. A scanned page is a picture of words, so it gives nothing until OCR PDF has recognised them.

The text is read in your browser by pdf.js, so your PDF stays on your device and there is no account to create. It takes one PDF at a time, up to 100 MB, and there are no settings to choose.

Open PDF to Text

Step by step

  1. 1Open the PDF to Text tool.
  2. 2Drop your PDF on the panel that says “Drop your PDF here, or browse”, or click it to choose the file. Its name, page count and size appear.
  3. 3Press Extract text. The button reads Extracting text… while the pages are read.
  4. 4Under “Text extracted”, check the character and page counts and read the text in the scrollable box. Select any part of it to copy just that passage.
  5. 5Press Download TXT, which shows the size of the file it will save. report.pdf is saved as report-text.txt. Start over clears the page for another document.
Open PDF to Text

What the text file holds

A PDF records where each run of text sits on the page rather than where its lines end, so the extractor works the breaks out from positions: a new line where the text drops down the page, and a space where the gap between letters is wide enough to be one. Pages are separated by one blank line, and no page numbers or markers are added. Typefaces, bold, colour, pictures and ruled lines are left behind.

The file is UTF-8, so any script comes through as long as the PDF maps its letters back to characters. A font embedded without that map gives wrong characters or none, and this tool cannot repair them.

Reading order, columns and tables

Where a PDF stores its text out of step with the page, the extractor puts it back in reading order: a heading stored after the text under it, a running header stored last, or a page number stored first is moved to where it reads. A page stored a column at a time comes out a column at a time, and a page with rotated or vertical text keeps the order stored in the file.

Horizontal alignment is lost. Columns and table cells come out as plain text, split by spaces and line breaks, so a table will not line up in a text editor.

If you want paragraphs and obvious list lines kept as Markdown instead of plain text, PDF to Markdown reads the same selectable text, also in your browser.

Pages with no text, and scanned PDFs

When some pages give nothing, the counts say how many of the document's pages the text came from, and a note names the pages with no selectable text. They may be blank, or scanned images. When no page has any text, the result reads “No selectable text found” and no file is made.

For scanned pages, use OCR PDF. It recognises the words and can return them as a .txt file with its Text sidecar output, or as a Searchable PDF you can bring back here. Unlike this tool, OCR PDF runs on our secure server rather than in your browser.

Hidden text comes out too

The extractor reads every character stored on the page, not only the ones you can see. White lettering, words under a black box drawn on top of them, and the invisible layer an OCR pass adds are all extracted, which makes this a quick test of whether a redaction really removed the words.

Answers typed into fillable form fields belong to the form, not the page, so they are not extracted. Run the file through Flatten PDF first, which also works in your browser, and the entries become page text.

Common questions

Is my PDF sent anywhere when I extract the text?

No. The text is read in your browser tab and the .txt file is made there too, so the PDF stays on your device from start to finish.

What does “No selectable text found” mean?

No page of the PDF stores characters, usually because the pages are scans or photos, or the lettering was turned into outlines. OCR PDF can recognise the words and return a .txt file, but it runs on our secure server rather than in your browser.

Are columns and tables kept?

A new line on the page becomes a new line in the file, but horizontal alignment is lost. Columns and table cells come out as plain text split by spaces and line breaks.

Why are my form entries missing from the text?

Entries typed into fillable fields are part of the form, not the page, so they are not extracted. Flatten the PDF first with Flatten PDF, then extract the text from the flattened copy.

Can it read a password-protected PDF?

Not one that needs a password to open: it stops while loading and says the file is password-protected. Unlock PDF removes that password if you know it, but it runs on our secure server. A PDF that opens without a password, even one set to forbid copying, is read like any other.

Tools used in this guide

All tools