Skip to content
Jellykit

PDF to Text

Extract the text layer of a PDF into a plain .txt file, page by page, in the file’s order or rebuilt from positions.

  • Runs on your device
  • Loads an engine on first use
Loading tool

About PDF to Text

Get the words out of a PDF so you can search them, quote them, feed them to another program or read them on a device that struggles with PDFs. Each PDF becomes one UTF-8 text file, with a marker, a form feed or a blank line between pages.

By default the text comes out in the order the file stores it, which is what copying from a PDF reader gives and usually follows columns. If that comes out jumbled, switch to rebuilding lines from where each word sits on the page. Scanned pages contain pictures of text rather than text, so they have nothing to extract; this tool tells you when that is the case.

How it works

  1. pdf.js, loaded from this site on first use, reads each page’s text layer: every string the page draws, with its position and size.
  2. In file order the strings are joined as stored, with a line break wherever pdf.js sees a line end. Rebuilt from positions, strings on the same baseline form a line, lines run top to bottom, and wider gaps become spaces.
  3. Pages are joined with the separator you choose and saved as UTF-8 text. Nothing is uploaded.

Questions

Why is there no text from my scanned PDF?

A scanner stores each page as a picture. There are no letters in the file to extract, only pixels. Convert the pages to images and use Image to Text, which recognises English print.

Why do some words run together or split apart?

A PDF stores where to draw characters, not where words begin. Spaces are inferred from the gaps between strings, which works for ordinary documents but can go wrong with tight letter spacing or unusual fonts.

Which reading order should I use?

Keep the file’s order for most documents, including those with columns. Switch to rebuilding from positions when lines come out in a strange order, for example in files assembled by design software.

Does it keep tables and formatting?

No. The result is plain text: no fonts, tables or images. Cells of a table come out as words on a line. For headings and paragraphs, try PDF to HTML.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.