Skip to content
WorldofPDFs

Extract the text from a PDF

Pull all the text out of a PDF and save it as a plain .txt or Markdown file, with the reading order preserved. Runs in your browser, works offline once loaded, and never uploads the document.

Extract Text

column detection · header and footer stripping

Ready

Loading tool…

How to Extract Text

  1. Add your PDF. Drag the file onto the drop zone. The text is read out immediately and shown in a preview pane.
  2. Check the output. Scroll the extracted text to confirm the reading order looks right, especially if the document has columns.
  3. Pick a format. Plain text for maximum compatibility, or Markdown if you want headings and paragraph breaks preserved as structure.
  4. Copy or download. Copy everything to the clipboard, or save it as a file.

Why copy-and-paste from a PDF goes wrong

Selecting text in a PDF reader and pasting it elsewhere usually produces a mess: line breaks in the middle of sentences, columns interleaved, headers and footers scattered through the body.

The reason is that a PDF does not store paragraphs. It stores instructions to draw specific characters at specific coordinates. There is no inherent notion of which characters belong to the same sentence, or which column comes first — that structure is something a reader has to infer from the geometry.

This tool does that inference deliberately rather than as a side effect of a selection rectangle. It groups characters into lines by vertical position, joins lines into paragraphs where the spacing suggests continuation, orders columns by their horizontal bands, and drops repeated headers and footers. The result is text you can actually use.

If nothing comes out, your PDF is a picture

Occasionally a PDF yields little or no text. Almost always this means it is a scan: the pages are photographs of paper, and there are no characters in the file to extract — only pixels that happen to look like letters.

The quick test is to try selecting text in any PDF reader. If your cursor will not highlight individual words, there is no text layer.

The fix is OCR, which recognises the shapes as characters and adds a real text layer. Run the file through the OCR tool first, then come back here. It is worth noting that OCR output is a best guess — expect to proofread, particularly with unusual fonts, poor scan quality or handwriting.

Extracting text from documents you cannot upload

Text extraction is a common first step before feeding a document into something else — a search index, a spreadsheet, a summarising tool, a script. That means the source is often a contract, a medical report, a legal filing or a set of meeting minutes.

Because extraction happens in your browser, the document is never transmitted. That keeps the option open to extract text from material you are contractually or legally prohibited from uploading to a third-party service, which is a surprisingly common constraint in professional work.

Frequently asked questions

Why is no text coming out of my PDF?

The document is almost certainly a scan — an image of a page with no text layer. Run it through the OCR tool first to generate one, then extract.

Does the extraction keep formatting?

Paragraph structure and reading order are preserved, and the Markdown option keeps headings and lists. Fonts, colours and exact positioning are not — this produces text, not a layout copy. For a layout-faithful version, PDF to HTML is the closer fit.

Are my files uploaded?

No. Text is extracted by your browser's own PDF engine and the file never leaves your device.

How does it handle multi-column layouts?

Columns are detected by their horizontal position and read in order, so an academic paper comes out as continuous prose rather than lines alternating between columns.

Can I extract text from just some pages?

Yes. Set a page range to pull text from part of the document rather than all of it.

What about tables?

Tables come out as text with the cell contents in reading order, which loses the grid. Rebuilding a real spreadsheet from a PDF needs table-detection engines that have no browser equivalent, so it is not something this site does.

Will it work on a password-protected PDF?

Remove the password first with the Remove Password tool, then extract from the unlocked file. Both run locally.

Related tools

Related reading

Longer guides covering the part this tool does not.

Turning a PDF into a web page without getting a screenshotTwo very different files both get called "PDF to HTML", and only one of them is a web page in any useful sense.Getting a table out of a PDF and into Excel intactThe table you can see on the page is not in the file, which explains nearly every way the conversion goes wrong.Merging PDFs without a watermark, and why the watermark exists at allThe stamp on a free merge is not a technical side effect. It is a bill, and it only exists because someone is paying for a server.Can redacted text be recovered from a PDF?Whether a redaction holds depends entirely on whether the text was removed or merely covered, and from the outside the two look identical.Why text copied from a PDF comes out garbledThe page looks perfect and the paste is nonsense, because what you see and what the file knows about its own text are two different things.How to tell whether a PDF is searchable or just a scanned imageA searchable PDF and a scanned one can look identical on screen, and the difference only shows up when you try to find, copy or upload the text.Why convert a PDF to Markdown before giving it to an AI model?A language model reads structure as well as words. Raw text copied out of a PDF throws the structure away; Markdown keeps it in a form the model already understands.What is a PDF, really?Everyone uses the format. Almost nobody is told what it actually stores — which is why so much PDF software behaves in ways that seem arbitrary.What is OCR, and when do you actually need it?Optical character recognition is the difference between a document you can search and a photograph of one. Here's how it works and where it goes wrong.Why is my PDF so big?Almost every oversized PDF is oversized for one of five reasons, and each has a different fix. Guessing wastes quality for nothing.What is PDF/A, and when do you need it?Courts, universities and government archives ask for it by name. It is the same format with the unreliable parts removed.What is a tagged PDF, and why accessibility needs oneA PDF stores characters at coordinates. Tagging is the layer that tells software what those characters mean.What is a PDF reader — and do you need anything more?Most people install software to do a job their browser already does. Here's where the actual boundaries fall.How to make a PDF smaller on a MacmacOS ships a one-click compressor that is famously heavy-handed. It is also adjustable, if you know where the dial is.