htmldocx
Convert html to docx
Decision gist · record as of 2026-08-14
Yes, if you need basic HTML-to-Word conversion and can accept dormant maintenance. The package is stable, has no known vulnerabilities, and handles common use cases well. However, if you require active bug fixes, new HTML feature support, or compatibility assurance with the latest python-docx versions, consider whether the lack of recent maintenance is acceptable for your project timeline.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction install with only two runtime dependencies (python-docx and beautifulsoup4).
- However, the package is dormant—last release was 2021-08-25 and last commit 2024-07-09, so maintenance is minimal despite the repository remaining active.
License · maintenance · safety
permissive license (permissive) — Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
last release 2021-08-25 (1815 days) · last repo commit 2024-07-09 · 89 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,202,067 downloads/mo, #4,229 on PyPI
Alternatives
Verify before relying
pip install htmldocx
from htmldocx import HtmlToDocx
from docx import Document
parser = HtmlToDocx()
document = Document()
parser.add_html_to_document('<p>Hello world</p>', document)
document.save('output.docx')- HTML feature coverage and limitations (which tags/attributes are supported or ignored)
- Performance characteristics with large HTML documents
- Compatibility with recent versions of python-docx and beautifulsoup4
What it is and what it does
htmldocx bridges HTML and Microsoft Word by converting HTML markup into .docx documents using python-docx as its rendering engine and beautifulsoup4 for HTML parsing. It offers three main workflows: adding HTML snippets to an existing Document object, parsing a complete HTML file into a new document, or converting an HTML string directly to a docx object. You can also configure table styling, including applying built-in Word styles or adding borders via the TableGrid style.
The package is straightforward for simple HTML-to-Word conversions but is no longer actively maintained—the last release was in 2021 and development has been dormant since then. It works with Python 3.6 and later and depends only on two well-established libraries, making installation frictionless.
Use it for
- Generate Word documents from HTML templates in web applications or report generators
- Convert HTML email content or web pages into downloadable .docx files for users
- Batch convert HTML files to Word documents as part of a document processing pipeline
- Add HTML-formatted content to existing Word documents programmatically
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need basic HTML-to-Word conversion and can accept dormant maintenance.
The package is stable, has no known vulnerabilities, and handles common use cases well. However, if you require active bug fixes, new HTML feature support, or compatibility assurance with the latest python-docx versions, consider whether the lack of recent maintenance is acceptable for your project timeline.
Install
htmldocx on PyPI
Before you install
Low friction install with only two runtime dependencies (python-docx and beautifulsoup4). However, the package is dormant—last release was 2021-08-25 and last commit 2024-07-09, so maintenance is minimal despite the repository remaining active.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute the package freely with minimal restrictions.
Quickstart
pip install htmldocx
from htmldocx import HtmlToDocx
from docx import Document
parser = HtmlToDocx()
document = Document()
parser.add_html_to_document('<p>Hello world</p>', document)
document.save('output.docx')
Verify before relying
- HTML feature coverage and limitations (which tags/attributes are supported or ignored)
- Performance characteristics with large HTML documents
- Compatibility with recent versions of python-docx and beautifulsoup4
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagespython-docxbeautifulsoup4 |
| Maintenance | Dormant 1,815 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,202,067 / month, #4,229 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: htmldocx-0.0.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “convert html to word document”
- htmldocxConverts HTML content into Microsoft Word documents (.docx format),…
- html2docxConverts valid HTML to Microsoft Word (.docx) format, returning a…
- mammothConverts Microsoft Word .docx documents to clean HTML or Markdown,…
Give your agent the search over MCP, or paste the wish link into any chat.
More HTML packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.
Install it if you need to parse or extract data from markup documents.
lxml provides Python bindings to libxml2 and libxslt, enabling parsing, validation, and transformation of XML and HTML documents through an ElementTree-compatible API with support for XPath, XSLT, and schema validation.
Install it if you need robust XML/HTML parsing, validation, or transformation; avoid it only if you must stay pure-Python and can accept slower performance.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
See also docxcompose · html-for-docx · docxtpl · html2docx · mammoth · docx · python-docx-ml6 · docx2txt · python-docx · docx2python