Toolstia / PDF to text converter

Extract text from a PDF

When you need the words from a PDF but not the layout, this tool reads the text stored in the file and puts it in a box you can copy or save as a .txt file. It suits quoting from a report, feeding a document into a spreadsheet or editor, checking what a PDF really contains, or pulling content out of a form that will not let you select text.

For documents with more than one page, each page begins with a marker such as --- Page 3 ---, so you can tell where one page ends and the next begins. The PDF is read by your browser, and the extracted text is shown right on the page, ready to copy. It reads only text that is actually stored in the file, so it is worth knowing in advance whether your PDF is a text file or a scan.

Drop a PDF here, or click to choose

One PDF at a time. Nothing is uploaded.

This reads the text stored inside the PDF. Line breaks may differ from what you see on the page, and tables may come out as plain lines. Scanned PDFs have no stored text.

How it works

  1. Drop in your PDF.
  2. Wait a moment while the pages are read.
  3. Copy the text or download it as a .txt file.

Works on text PDFs

PDFs made from Word, a web page or a report usually have real text inside, and this tool reads it. A page marker is added before each page of a longer document.

Scanned PDFs

A scan is only a picture of a page, with no text inside. This tool cannot read it, because that needs OCR (text recognition). It will tell you when no text is found.

Layout

Only the words are extracted. Columns, tables and headers may come out as plain lines in an order that is a little different from what you see on the page.

Languages

The tool reads whatever text the PDF stores, including non-English scripts. Some PDFs store text in a way that copies out badly, and that is a limit of the file itself.

Text PDFs versus picture PDFs

There are two very different kinds of PDF. A text PDF is made by exporting from Word, a web page, an accounting system or a design tool, and the characters are stored as characters. A picture PDF is made by scanning paper or taking photos, and each page is just an image with no characters inside at all.

A quick test is to open the file in any viewer and try to select a word with the mouse. If you can highlight individual words, this tool will read them. If you can only drag a box over the whole page, the file is a picture and you will see a message saying no text was found. Reading pictures of text requires OCR, which is a separate technique this tool does not include.

Why the line order can look odd

A PDF does not store a paragraph. It stores small runs of text, each with a position on the page, in whatever order the creating program wrote them. The tool joins these runs in stored order and starts a new line where the file marks a line end. For simple one-column documents the result reads naturally, but a two-column magazine page or a table may come out column after column or with cells in an unexpected sequence.

Page headers, footers and page numbers are text too, so they appear in the output at the position where they are stored, often in the middle of a flow of text when the document is longer than a page.

Cleaning up the extracted text

Expect a few quirks after extraction. Words split by a hyphen at a line end stay split. Some fonts store ligatures such as fi as one special character. Bullets may appear as unusual symbols. Soft line breaks inside a paragraph are kept, so pasting into a word processor can leave you with a short line per row of the original.

To tidy a paragraph, paste the text into a remove-line-breaks tool or a text editor and use find and replace. For tables, copying the text into a spreadsheet and splitting by spaces usually works better than expecting columns to survive.

Non-English text and copy-protected files

The tool returns whatever Unicode text the file stores, so Bangla, Arabic, Chinese, Cyrillic and accented Latin text will come through when the PDF is built properly. Problems come from files whose fonts were embedded without a text mapping. In those files each glyph is drawn correctly on screen, but the stored character codes are meaningless, so any extraction tool returns gibberish or empty boxes. That is a flaw in the file itself.

A PDF that needs a password just to open is rejected with a message asking you to remove the password first. A PDF that opens freely but has copying restrictions set may still be read, but you should only extract text from documents you are entitled to use.

Size and speed

Pages are read one after another, and no limit is set on page count, but a long document of several hundred pages can take a little while and will use more of your device's memory. If the browser tab becomes slow, split the PDF into parts first and extract each part. The text appears in a read-only box, so you copy it with the Copy button or save a UTF-8 .txt file named after the PDF.

Questions

Is my PDF uploaded?

No. Everything happens in your browser.

Why is no text found?

The PDF is probably a scan or made of images. It needs OCR, which this tool does not do.

Can it open a protected PDF?

Not if it needs a password to open.

Is there a page limit?

No fixed limit, but very large files take longer.

Can it extract text from a photo of a document?

No. A photo or scan contains pixels, not characters, and this tool does not do OCR. You would need an OCR program that recognizes the letters in the image first.

Why is some text missing from the result?

Text drawn as a picture, such as a logo or a chart saved as an image, is not stored as text and cannot be extracted. Only characters stored in the file come out.

Are the page markers saved in the .txt file?

Yes. The downloaded file contains exactly what you see in the box, including the --- Page N --- lines. Delete them in a text editor if you do not want them.

Does it keep bold, italics and fonts?

No. The output is plain text, so formatting, colors, images and fonts are all left out.

What encoding is the downloaded file in?

UTF-8, which handles every language. If an old program shows strange characters, open the file as UTF-8 in that program's import dialog.