skillfed

textract

extract text from any document. no muss. no fuss.

textract v2.0.0 454.9K downloads/30d#6,565 on PyPI4,690
Permissive license MIT Active released

What it is and what it does

textract is a document text extraction library that abstracts away the complexity of handling multiple file formats. Instead of learning separate APIs for PDF, Word, PowerPoint, Excel, and image files, you call a single function and get text back. It wraps specialized libraries (pdfminer-six for PDFs, python-pptx for presentations, xlrd for spreadsheets, docx2txt for Word, pillow for images, and others) into one consistent interface.

The package is designed for straightforward use: point it at a file, get text out. It handles format detection and delegates to the appropriate underlying tool. With 4690 GitHub stars and active maintenance, it serves as a practical utility for workflows that need to ingest text from mixed document sources without writing format-specific extraction code.

Use it for:

  • Batch processing a folder of mixed document types (PDFs, Word docs, spreadsheets) to extract and index text.
  • Building a document search or archival system that needs to read text from files in multiple formats.
  • Automating data extraction from email attachments and embedded documents.
  • Preparing documents for NLP pipelines by converting various formats to plain text.
  • Creating a document ingestion layer for a content management or knowledge base system.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Extracts text from documents in multiple formats (PDF, Word, PowerPoint, Excel, images, email) with a single unified interface.

Yes, if you need to extract text from multiple document formats and want to avoid learning separate APIs for each. The low install friction, active maintenance, MIT license, and unified interface make it a practical choice for document processing workflows. No known vulnerabilities as of 2026-08-14.

Install

textract on PyPI

pip

pip install textract

uv

uv add textract

poetry

poetry add textract

Installing textract

Before you install

Low friction install with 11 runtime dependencies. Active maintenance: last commit 2026-08-05, release 109 days ago. Supports current Python versions (requires >=3.9).

License in practice

MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license and copyright notice.

Quickstart

pip install textract

import textract
text = textract.process('document.pdf')
print(text)

Requires system libraries for some formats (e.g., pdfminer-six for PDF, python-pptx for PowerPoint); pillow for image text extraction.

Verify before relying

  • Whether OCR capabilities are included for scanned images or if text extraction is limited to searchable documents.
  • Performance characteristics with large documents or batch processing of many files.
  • Specific format support and any known limitations or edge cases per document type.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 11 — pillow, speechrecognition, argcomplete, beautifulsoup4, lxml, chardet, docx2txt, extract-msg, pdfminer-six, python-pptx, xlrd
Maintenance actively maintained — 109 days since the last release
Last repo commit
First released
Downloads 454,872/month — #6,565 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: textract-2.0.0-py3-none-any.whl

Tags

extract text from pdfdocument text extractionconvert documents to textmulti-format text extractionpdf word excel text extractiondocument parsing librarytext from images and documents
document-extractionmulti-formattext-processing

More Text Processing packages