# Mammoth

Convert Word documents (.docx files) to HTML

Repository: https://github.com/mwilliamson/python-mammoth
Canonical: https://ross.abutalabs.com/products/mammoth
Language: Python
License: BSD-2-Clause
License Family: permissive
Last push: 2026-08-09T13:59:23+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 35, longevity 100
- inputs: {"age_days": 4658, "days_push": 24, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1114, forks 150 (observed 2026-08-28T04:03:38.239982+00:00)

## What it is
Mammoth is a library and CLI tool that converts .docx Word documents (from Word, Google Docs, LibreOffice) into clean, semantic HTML by mapping document styles to HTML elements rather than copying visual formatting. It is available for JavaScript/Node.js, Python, Java, .NET, and WordPress, with a browser demo included.

## Use cases
- convert docx to html
- extract clean html from word documents
- migrate word content to a cms or blog
- convert google docs exports to html
- programmatically parse docx files into semantic markup
- batch convert word documents to html from the command line

## When to choose
- you want simple, semantic HTML instead of a pixel-perfect copy of Word styling
- your documents use styles (headings, lists, tables) to convey structure
- you need conversion across multiple platforms (Node, Python, JVM, .NET, browser)

## When to avoid
- you need faithful reproduction of complex Word formatting and layout
- you must process untrusted documents without sanitizing the output, since Mammoth performs no sanitisation
- your documents rely heavily on text boxes, complex tables, or exotic styling

## Facets
- artifact type: library
- maturity: active
- function: parser, pdf
- domain: files, web-development, developer-tools
- platform: python, jvm, dotnet, browser, cli, cross-platform
- tags: docx, html-conversion, word-documents, document-conversion, semantic-html, nodejs

## Member repositories
- mwilliamson/python-mammoth (main) score 75
- mwilliamson/mammoth.js (sdk) score 66

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.239982+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:46:18.568389+00:00, confidence not recorded.
  - readme: https://github.com/mwilliamson/python-mammoth (fetched 2026-08-28T04:03:38.239982+00:00, sha 1a4fcce486f2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
