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
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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Docx2Html --version 5.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
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 | Versions 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.