โ† Word (.docx): all libraries ยท Reader board

python-docx vs docx2txt: which one reads more real-world Word (.docx) files?

python-docx 1.2.0 and docx2txt 0.9 on the same 130 odd real-world files from Apache POI test files (bug reports, fuzzers, broken exporters). Measured, not opinion; re-tested by itself on every new PyPI release. Updated 06 November 2026.

More files readdocx2txt102 vs 88
Faster on this setdocx2txt2.9 s vs 4.3 s total (about as fast)
Both read87only python-docx: 1 ยท only docx2txt: 15

docx2txt got text from more files: 102 vs 88 of 130. python-docx broke (error, hang or crash) on 2 files that docx2txt read; docx2txt broke on 1 files that python-docx read.

LibraryText from๐Ÿ”ด Fails where
the other reads
๐ŸŸก Empty where
the other reads
โฑ Hangs or
crashes
Median
ms/file
Total
seconds
python-docx 1.2.088213034.3
docx2txt 0.910210012.9

Files only python-docx reads (1)

ExternalEntityInText.docxdocx2txt: ParseError: undefined entity &testent;: line 5, column 1180

Files only docx2txt reads (15)

60329.docxpython-docx: no text
61470.docxpython-docx: no text
Bug54771a.docxpython-docx: no text
Bug54771b.docxpython-docx: no text
Bug60341.docxpython-docx: no text
Bug64561.docxpython-docx: no text
Bug66263-table.docxpython-docx: no text
EmptyDocumentWithHeaderFooter.docxpython-docx: no text
FldSimple.docxpython-docx: no text
Headers.docxpython-docx: no text
Tika-792.docxpython-docx: no text
clusterfuzz-testcase-minimized-POIXWPFFuzzer-6733884933668864.docxpython-docx: BadZipFile: Bad CRC-32 for file 'word/theme/theme1.xml'
deep-table-cell.docxpython-docx: XMLSyntaxError: Excessive depth in document: 256, use XML_PARSE_HUGE option, line 507, column 15 (<string>, line 507)
headerFooter.docxpython-docx: no text
shapes-with-text.docxpython-docx: no text

What this does not tell you

This compares not breaking: whether each library gets any text out of each file. It does not rank text quality (reading order, tables, headings), and speed is one GitHub-hosted runner, default settings, no OCR switched on. If you need structure for RAG, also look at the output on your own files.

How this is measured