Extract the text from a PDF

A PDF does not store sentences. It stores glyphs at coordinates, and the paragraph you can see is an inference. This rebuilds runs and line breaks from those positions, which is why the output reads as text rather than as scattered fragments.

Pull the text out of a PDF with lines and spacing rebuilt from glyph positions. Export as plain text or as JSON with coordinates. In your browser, nothing uploaded.

Open the editor

Free, no account, and the file stays on your machine.

What comes out

Plain .txt for reading, quoting or feeding to something else, with an option to write a --- page n --- marker between pages so you can still tell where you are. Or .json, which keeps each line's position and type size alongside its text — the format to take if you are parsing the document programmatically rather than reading it.

You can also write one file per page instead of a single document, which suits splitting a long report into per-section inputs.

The preview shows the result before you download anything, with a character count and page count, so you can see whether a document is going to give you what you need before committing to it.

Scanned documents

If a PDF is a photograph of a page, there is no text in it to extract, and this will correctly report almost nothing. That is a property of the document, not a failure of the tool — telling the two apart is exactly what the character count in the preview is for.

Making a scan searchable requires OCR, which is a different job from this one.

Questions

Why is the text order sometimes odd?

Multi-column layouts, sidebars and tables are laid out visually, not in reading order, and a PDF does not record which is which. Lines are grouped by baseline, so a two-column page can interleave. The JSON output includes coordinates if you need to re-sort it yourself.

Does it work on scanned PDFs?

No. A scan holds images, not text. You would need OCR first, which this does not do.

Can I get the text of just one section?

Extract the pages you want, or use one file per page and take the ones you need.

Are ligatures and hyphenation handled?

Text comes out as the document encodes it. Ligatures map back to their characters; a word hyphenated across a line break stays hyphenated, because the break is real in the source.

Related