skillfed

docx2txt

A pure python-based utility to extract text and images from docx files.

docx2txt v0.9 8.6M downloads/30d#1,604 on PyPI585
License unclear AGING released

What it is and what it does

docx2txt is a pure-Python utility that reads Microsoft Word .docx files and extracts their text content, along with headers, footers, hyperlinks, and embedded images. It provides both a command-line tool and a Python API, making it usable in scripts or as part of a larger application. The package has no runtime dependencies, so installation is lightweight and friction-free.

The code is adapted from existing docx tooling but focuses specifically on text and image extraction rather than document manipulation. It's positioned as a simpler alternative when you only need to pull content out of .docx files rather than create or modify them. With significant real-world use, though maintenance is infrequent (last update 508 days ago).

Use it for:

  • Batch-process Word documents to extract text for indexing, search, or archival systems.
  • Automate extraction of images embedded in .docx files for asset management or document scanning workflows.
  • Build a document ingestion pipeline that converts .docx content into plain text for NLP or analysis tasks.
  • Extract header and footer content from formal documents for metadata or compliance auditing.
  • Command-line tool for one-off conversion of .docx files to text without opening Word.

Worth the install?

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

Extracts text, headers, footers, hyperlinks, and images from Microsoft Word .docx files using pure Python, with both command-line and programmatic interfaces.

Yes, if you need straightforward .docx text and image extraction and can verify the license terms. The package is mature, has no dependencies, and handles the core task well. The aging maintenance status and unclear license are minor concerns—check the repository for the actual license before using in production, and test with your specific .docx variants to confirm compatibility.

Install

docx2txt on PyPI

pip

pip install docx2txt

uv

uv add docx2txt

poetry

poetry add docx2txt

Installing docx2txt

Before you install

Installation is straightforward with no runtime dependencies. The package is aging (last release 508 days ago) but the repository remains active and unarchived, suggesting maintenance is infrequent rather than abandoned.

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. You should verify the actual license terms in the repository before relying on this package in a commercial or copyleft-sensitive context.

Quickstart

pip install docx2txt

import docx2txt

# Extract text from a .docx file
text = docx2txt.process("file.docx")

# Extract text and save images to a directory
text = docx2txt.process("file.docx", "/tmp/img_dir")

Verify before relying

  • Whether the package handles all .docx file variants and edge cases reliably.
  • Exact license terms and any attribution requirements from the adapted code.
  • Python version compatibility (requires_python is unspecified in metadata).
  • Performance characteristics with large or complex .docx documents.

Package facts

License not declared (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 508 days since the last release
Last repo commit
First released
Downloads 8,581,646/month — #1,604 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: docx2txt-0.9-py3-none-any.whl

Keywords: python, docx, text, images, extract

Tags

extract text from docxdocx to text converterword document text extractiondocx image extractionpython docx parserextract images from word filesdocx header footer extraction
document-extractionoffice-formatscli-tool

More Text Processing packages