Mammoth .docx converter
Mammoth converts semantically marked up .docx documents to simple and clean HTML, allowing pasting from Word and Google Docs without the usual mess.
The facts
- Rating
- 4.8★ from 62
- Active installs
- 20k+
- Price
- Free
- Last updated
- 12 Mar 2026
- Added
- May 2013
- Requires WP
- 4.0
- Tested up to
- WP 6.9.7
- Downloads
- 466,193
Our analysis
AI-assistedMammoth .docx converter is a WordPress plugin that converts .docx documents into HTML. It focuses on producing clean and simple HTML by using semantic information from the document while ignoring detailed formatting. This makes it suitable for users who want to paste content from Word documents without the usual formatting issues.
The plugin supports various elements such as headings, lists, tables, footnotes, images, and links. It is best used with documents that employ styles for semantic markup, as more complex documents may not convert perfectly due to structural differences between .docx and HTML.
Best for: This plugin is suitable for users who need to convert simple .docx documents into HTML for their WordPress sites.
What it does well
- ✓Converts .docx documents to clean HTML
- ✓Supports headings, lists, tables, and images
- ✓Allows for custom style mapping
- ✓Free to use from the WordPress.org directory
- ✓Regularly updated with a high rating
Where it falls short
- •Complex documents may not convert perfectly
- •Limited to specific supported features
Verdict
Mammoth .docx converter provides a straightforward solution for converting .docx files to HTML, particularly for those who use semantic styles. It may not be ideal for documents with intricate formatting.
From the developer
Michael Williamson's own description of Mammoth .docx converter, lightly tidied.
Mammoth is designed to convert .docx documents, such as those created by Microsoft Word, Google Docs and LibreOffice, and convert them to HTML. Mammoth aims to produce simple and clean HTML by using semantic information in the document, and ignoring other details. For instance, Mammoth converts any paragraph with the style Heading1 to h1 elements, rather than attempting to exactly copy the styling (font, text size, colour, etc.) of the heading. This allows you to paste from Word documents without the usual mess.
There’s a large mismatch between the structure used by .docx and the structure of HTML, meaning that the conversion is unlikely to be perfect for more complicated documents. Mammoth works best if you only use styles to semantically mark up your document.
The following features are currently supported:
-
Headings.
-
Lists.
-
Tables. The formatting of the table itself, such as borders, is currently ignored, but the formatting of the text is treated the same as in the rest of the document.
-
Footnotes and endnotes.
-
Images.
-
Bold, italics, superscript and subscript.
-
Links.
-
Text boxes. The contents of the text box are treated as a separate paragraph that appears after the paragraph containing the text box.
Embedded style maps
By default, Mammoth maps some common .docx styles to HTML elements. For instance, a paragraph with the style name Heading 1 is converted to a h1 element. If you have a document with your own custom styles, you can use an embedded style map to tell Mammoth how those styles should be mapped. For instance, you could convert paragraphs with the style named WarningHeading to h1 elements with class="warning" with the style mapping:
p[style-name='WarningHeading'] => h1.warning:fresh
An online tool can be used to embed style maps into an existing document. Details of how to write style maps can be found on the mammoth.js documentation.
A style map to be used for all documents can be set by configuring Mammoth (see below).
Configuration
Mammoth can be configured by writing a separate plugin. For instance, this example plugin adds a custom style map, and uses a document transform to detect paragraphs of monospace text and converts them to paragraphs with the style “Code Block”.
As a WordPress plugin, Mammoth uses the JavaScript library mammoth.js to convert documents. Mammoth will use the JavaScript global MAMMOTH_OPTIONS whenever calling mammoth.js, which allows for some customisation. MAMMOTH_OPTIONS should be defined as a function that returns an options object. This options object will then be passed in as the options argument to convertToHtml. The mammoth.js docs describe the various options available.
The global MAMMOTH_OPTIONS will be called with mammoth as the first argument. This can be useful if you need to use a function from mammoth.js, such as mammoth.transforms.getDescendantsOfType.