Docx2Html 5.4.2

dotnet tool install --global Docx2Html --version 5.4.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Docx2Html --version 5.4.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Docx2Html&version=5.4.2
                    
nuke :add-package Docx2Html --version 5.4.2
                    

docx2html

Convert Word documents (DOCX) to HTML.

Installation

dotnet tool install -g Docx2Html

Usage

# Basic usage - outputs to document.html
docx2html document.docx

# Specify output file
docx2html document.docx output.html

# With custom page title
docx2html document.docx --title="My Document"

# Extract images to separate files instead of embedding as base64
docx2html document.docx --extract-images

# Use inline styles instead of CSS classes
docx2html document.docx --inline-styles

Options

Option Description
--title=<text> Page title (default: document title or filename)
--css-prefix=<text> CSS class prefix (default: pt-)
--inline-styles Use inline styles instead of CSS classes
--extract-images Save images to separate files instead of embedding
-h, --help Show help message
-v, --version Show version information

Features

  • Converts paragraphs, headings, lists, tables, and formatting
  • Handles images (embedded as base64 or extracted to files)
  • Preserves hyperlinks and bookmarks
  • Supports bidirectional (RTL) text
  • Generates clean, semantic HTML5

Limitations

  • Math equations (OMML) are not converted
  • Charts and diagrams appear as images (if embedded) or are omitted
  • Complex text boxes may not render perfectly

Environment Variables

  • DOCX2HTML_DEBUG=1: Show detailed error information including stack traces

License

MIT License

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
5.4.2 55 1/26/2026
5.4.1 48 1/21/2026
5.4.0 136 12/24/2025
5.3.0 114 12/21/2025
5.2.0 100 12/6/2025
5.1.2 154 12/4/2025