Home/Converter Tools/PDF to TXT
📝

PDF to TXT

FREE

Extract the text layer of a PDF into a plain-text file

Free · No sign-up required
Loading...

What PDF to TXT does

This tool pulls the text out of a PDF and gives it to you as a plain .txt file, page by page. It reads the text objects the PDF actually contains — the same data a viewer uses for search and copy — so the result is exact for documents that were created from a word processor, a browser or a design tool. Extraction runs with PDF.js in your browser; the document is not uploaded, which matters for contracts, statements and anything confidential.

What you get

  • All text from every page, in reading order as stored in the file, with a page separator between pages.
  • Words within a line are joined with spaces; paragraph and line structure is approximated from the text positions.
  • Plain text only — no fonts, sizes, colours, images, tables or layout. Tables come out as their cell text in row order, which is usable but needs reformatting.
  • Headers, footers and page numbers are included, since they are text on the page.

When it works and when it does not

PDF typeResult
Exported from Word, Google Docs, LaTeX, a browserClean, complete text
Reports and papers with columnsGood, though columns may interleave — check reading order
Forms with filled fieldsStatic text extracted; field values may be missing unless flattened
Scanned documents (image only)Nothing — there is no text layer. Needs OCR first
Scans that have been OCR'dThe OCR text layer is extracted, with whatever errors OCR made
PDFs with non-embedded or symbol fontsMay produce wrong characters or gibberish for those fonts

The quickest test: open the PDF in any viewer and try to select text. If you can, this tool will extract it; if the cursor selects nothing or a whole page as one block, the page is an image.

Common uses

  • Getting the text of a contract, paper or e-book into a note-taking app, a word processor or a translation tool.
  • Feeding documents to a search index, a script or a language model.
  • Word counts and readability analysis — paste the result into the Word Counter.
  • Recovering content from a PDF whose source file is lost.
  • Reading on devices or with assistive tools that handle plain text best.
  • Quoting passages without retyping.

Cleaning up the output

  • Hyphenated line breaks (“infor-” / “mation”) are preserved as they appear; a find-and-replace of “-\n” with nothing rejoins most of them.
  • Hard line breaks at the ends of PDF lines can be joined into paragraphs with a text editor's reflow or the Text Cleaner tool.
  • Repeated headers and page numbers are easiest to remove with a regular expression once you see the pattern.
  • Ligatures (fi, fl) and smart quotes are Unicode characters and usually come through correctly; some older PDFs map them oddly.

Frequently asked questions

The output is empty. Why?

The PDF is a scan or an image export with no text layer. Run OCR (Acrobat, macOS Preview's Live Text, Google Drive, Tesseract) to create one, then extract.

The text is out of order.

Multi-column layouts and text boxes are stored in the order they were drawn, which may not match reading order. Rearrange in an editor, or copy column by column from a viewer.

Can I extract to Word or Markdown instead?

Not here. Paste the .txt into Word, or use a converter like Pandoc or an online PDF-to-DOCX service for layout-preserving output.

Are tables preserved?

Only as text in row order. Tabular extraction with column boundaries needs dedicated tools such as Tabula or Camelot.

Does it work on password-protected PDFs?

No. Unlock the file first with Unlock PDF (you need the password).

Is the document uploaded?

No. Text extraction runs in your browser with PDF.js.

More tools in this category

🖼
JPG to PNG
Convert JPG to lossless PNG for editing or PNG-only uploads
🌐
JPG to WebP
Re-encode JPG as WebP for 25–35% smaller web images
🌐
PNG to WebP
Shrink PNG screenshots and graphics to WebP, transparency kept
🖼
WebP to PNG
Convert WebP downloads to lossless PNG with transparency
📱
HEIC to PNG
Convert iPhone HEIC photos to lossless PNG
SVG to PNG
Render an SVG to a PNG at any pixel size