PDFConversionToolsTools

PDF to Text

Runs in your browser

Pull the words out of a PDF into a plain text file, in your browser. Nothing is uploaded. This reads the text layer the document already has, which is quick and exact, and does nothing at all on a scan.

or drop them here, or paste

One file. It stays on your device.

A PDF made by a word processor stores its words as text, along with instructions for where to draw each run of them. This tool reads that text layer out, page by page, and writes it to a .txt file.

Everything happens inside this page. Your file is read by JavaScript running on your own machine, and no part of it is sent anywhere.

A scan will give you nothing

If your PDF is a scan, there is no text layer. The words are shapes in a picture, and there is nothing to extract. The output will be empty and that is the correct result rather than a failure.

Making a scan searchable needs OCR, which looks at the shapes and works out what letters they are. It is a genuinely different operation with a genuinely different accuracy: the text layer here is exact because it was never guessed, and OCR output never is.

The quick way to tell which kind you have is to open the PDF and try to select a word. If the selection highlights the text, this tool will work. If it draws a rectangle over the picture, it will not.

Why the layout does not survive

PDF does not store paragraphs, columns or tables. It stores runs of characters and coordinates. A two column page is not two columns as far as the file is concerned, it is a set of text runs that happen to sit in two groups.

So extracted text comes out in the order the runs were written, which is usually reading order and sometimes is not. Two column layouts interleave. Tables lose their alignment. Headers and footers appear in the middle of the flow. None of that is recoverable without guessing, and this tool does not guess.

Line breaks are approximate

The format has no concept of a line ending either. What is used here is the renderer's record of where one run of text finished, which is the closest thing available and is right most of the time.

Expect some lines to break where the original wrapped rather than where a paragraph ended. For most uses, feeding text to something else, searching it, counting it, that is fine.

Page markers

Each page's text is preceded by a marker giving its number, so you can tell where a passage came from. It also gives you something to split on if you want the pages separately.

How to pdf to text

  1. 01

    Add your PDF

    Select or drop the file.

  2. 02

    Extract

    Press Extract text and the pages are read in order.

  3. 03

    Download

    Save the plain text file.

Questions about PDF to Text

How do I extract text from a PDF?

Add the file and press Extract text. The words in the document's text layer are written to a plain .txt file, with a marker at the start of each page.

Why is the extracted text empty?

Because the PDF is a scan and has no text layer. The words are shapes in a picture. Extracting them needs OCR, which is a different operation.

Why is the text out of order?

PDF stores runs of characters and coordinates rather than paragraphs or columns, so a two column page comes out interleaved. Rebuilding the reading order needs guesswork, which this tool does not do.

Does this work on a password protected PDF?

Not while it is protected. Remove the password with the unlock tool first, which needs the password you already have.

Where this runs

Runs in your browser. Your file is never uploaded.

How browser-based PDF tools work

Related tools