← Word (.docx): all libraries · Reader board

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

mammoth 1.13.0 and python-docx 1.2.0 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 readmammoth94 vs 88
Faster on this setpython-docx4.3 s vs 14.9 s total (3× faster)
Both read88only mammoth: 6 · only python-docx: 0

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

LibraryText from🔴 Fails where
the other reads
🟡 Empty where
the other reads
⏱ Hangs or
crashes
Median
ms/file
Total
seconds
mammoth 1.13.094000914.9
python-docx 1.2.08815034.3

Files only mammoth reads (6)

Bug54771a.docxpython-docx: no text
Bug54771b.docxpython-docx: no text
Bug64561.docxpython-docx: no text
Bug66263-table.docxpython-docx: no text
clusterfuzz-testcase-minimized-POIXWPFFuzzer-6733884933668864.docxpython-docx: BadZipFile: Bad CRC-32 for file 'word/theme/theme1.xml'
shapes-with-text.docxpython-docx: no text

Files only python-docx reads (0)

None.

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