Title: Mammoth .docx converter
Author: Michael Williamson
Published: <strong>May 12, 2013</strong>
Last modified: March 12, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/mammoth-docx-converter.svg)

# Mammoth .docx converter

 By [Michael Williamson](https://profiles.wordpress.org/michaelwilliamson/)

[Download](https://downloads.wordpress.org/plugin/mammoth-docx-converter.1.22.0.zip)

 * [Details](https://wordpress.org/plugins/mammoth-docx-converter/#description)
 * [Reviews](https://wordpress.org/plugins/mammoth-docx-converter/#reviews)
 *  [Installation](https://wordpress.org/plugins/mammoth-docx-converter/#installation)
 * [Development](https://wordpress.org/plugins/mammoth-docx-converter/#developers)

 [Support](https://wordpress.org/support/plugin/mammoth-docx-converter/)

## Description

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](https://mike.zwobble.org/projects/mammoth/embed-style-map/) 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](https://github.com/mwilliamson/mammoth.js#writing-style-maps).

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](https://github.com/mwilliamson/mammoth-wordpress-plugin/tree/master/examples/options-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](https://github.com/mwilliamson/mammoth.js)
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`.

#### FAQs

[Answers to some frequently asked questions about Mammoth](https://mike.zwobble.org/projects/mammoth/faqs/).

## Installation

Install the plugin in the usual way, and you should be able to use the Mammoth .
docx converter when adding a post. If you can’t see the meta box, make sure that
it’s selected by taking a look at the “Screen Options” for adding a post.

## Reviews

![](https://secure.gravatar.com/avatar/caf93f9448fc8b0fb68bcfa79f7e4f8ea7dbb7c04f7f1b2512543e74a906f35e?
s=60&d=retro&r=g)

### 󠀁[Very helpful](https://wordpress.org/support/topic/very-helpful-1546/)󠁿

 [ebussinetz](https://profiles.wordpress.org/ebussinetz/) August 5, 2025

Thank you for this nice peace of art!!!

![](https://secure.gravatar.com/avatar/d58bcdcb35d032a0283701dab8fc4f855dadbf769aeeb0130514edb91736927f?
s=60&d=retro&r=g)

### 󠀁[A must-have!](https://wordpress.org/support/topic/a-must-have-520/)󠁿

 [miketosk](https://profiles.wordpress.org/miketosk/) June 6, 2024

This plugin was literally a lifesaver! I had to import dozens of pages of a manual
with texts and photos and the function that automatically uploads the photos to 
the library was FUNDAMENTAL. Thank you so much!

![](https://secure.gravatar.com/avatar/9d01a02663232b0f0c0f99ec38987629bd35cda471dcbe389c8408cbdccc32f7?
s=60&d=retro&r=g)

### 󠀁[Cannot activate this plugin! Fixed](https://wordpress.org/support/topic/cannot-activate-this-plugin-3/)󠁿

 [lionelanh97](https://profiles.wordpress.org/lionelanh97/) March 7, 2024 1 reply

I installed the plugin but I could not activate it! Edit: It works now.

![](https://secure.gravatar.com/avatar/e52f35c98cac93f42e8a94a9a191c790133c1371602ab6174c719a0ff8bc5839?
s=60&d=retro&r=g)

### 󠀁[Saved me hours of work!](https://wordpress.org/support/topic/saved-me-hours-of-work-17/)󠁿

 [mindbarometer](https://profiles.wordpress.org/mindbarometer/) July 17, 2023

man you’re a genius 🙂

![](https://secure.gravatar.com/avatar/da270debddfeee4abd27d4a6503894cd3bcded5302738747b4e94e58d8241320?
s=60&d=retro&r=g)

### 󠀁[Great plugin](https://wordpress.org/support/topic/great-plugin-37178/)󠁿

 [adeelaziz](https://profiles.wordpress.org/adeelaziz/) July 9, 2023

highly recommended Pugin if you regularly upload blogs on WordPress

![](https://secure.gravatar.com/avatar/fdb5a07e7d54188e086600229a7d17d0e2880db6cb7c523189a039cb3f39eed5?
s=60&d=retro&r=g)

### 󠀁[Beast plugin](https://wordpress.org/support/topic/beast-plugin/)󠁿

 [xtream prince](https://profiles.wordpress.org/xtreamprince/) May 16, 2023

One of the most useful plugin out there.

 [ Read all 62 reviews ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/)

## Contributors & Developers

“Mammoth .docx converter” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Michael Williamson ](https://profiles.wordpress.org/michaelwilliamson/)

[Translate “Mammoth .docx converter” into your language.](https://translate.wordpress.org/projects/wp-plugins/mammoth-docx-converter)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/mammoth-docx-converter/),
check out the [SVN repository](https://plugins.svn.wordpress.org/mammoth-docx-converter/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/mammoth-docx-converter/)
by [RSS](https://plugins.trac.wordpress.org/log/mammoth-docx-converter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.22.0

 * Update mammoth.js to 1.12.0. This includes support for checkboxes and improved
   support for hyperlinks.

#### 1.21.0

 * Update mammoth.js to 1.7.0. This includes support for documents in the strict
   format.

#### 1.20.0

 * Update mammoth.js to 1.4.21. This includes improved underline support and image
   handling.

#### 1.19.0

 * Update mammoth.js to 1.4.18. This includes better support for internal hyperlinks.

#### 1.18.0

 * Update mammoth.js to 1.4.17. This includes better support for numbering, and 
   conversion of symbols to their corresponding Unicode characters.

#### 1.17.0

 * Update mammoth.js to 1.4.13. This includes support for soft hyphens and improved
   underline support.

#### 1.16.0

 * Improve support for detecting when the Gutenberg editor is active. This should
   fix compatibility with some other plugins such as Yoast SEO when the Gutenberg
   editor is disabled.

#### 1.15.0

 * Update mammoth.js to 1.4.9.

#### 1.14.0

 * Improve support when X-Frame-Options is set to “deny”.

#### 1.13.0

 * Update mammoth.js to 1.4.8.

#### 1.12.0

 * Add basic Gutenberg support.
 * Update mammoth.js to 1.4.7.

#### 1.11.0

 * Fix IE11 support.

#### 1.10.0

 * Add workaround for a bug in tinyMCE in WordPress 4.9.6.

#### 1.9.0

 * Update mammoth.js to 1.4.6. This includes preservation of whitespace in pre elements,
   and paragraphs in endnotes, footnotes and comments.

#### 1.8.0

 * Update mammoth.js to 1.4.4. This includes better support for reading documents
   created by Word Online.

#### 1.7.0

 * Update mammoth.js to 1.4.2. This includes improved handling of grouped objects
   and non-breaking hyphens.

#### 1.6.0

 * Allow MAMMOTH_OPTIONS to override idPrefix.
 * Update mammoth.js to 1.4.0. This includes improved handling of hyperlinks, and
   converts table headers into thead elements.

#### 1.5.0

 * Handle unsuccessful image uploads where the HTTP request succeeds, but WordPress
   rejects the file. Fixes an issue where documents with EMF images couldn’t be 
   imported.
 * Update mammoth.js to 1.3.2. This includes a fix for documents where images are
   referenced by a URI relative to the base URI.

#### 1.4.0

 * Update mammoth.js to 1.3.1. This includes new ways to map styles, such as style
   name prefixes.
 * Improve styling of preview to match the editor.
 * Fix a bug where images wouldn’t upload on certain server configurations.
 * Allow options to be passed to mammoth.js through a MAMMOTH_OPTIONS global variable.

#### 1.3.0

 * Update mammoth.js to 1.2.5. This includes better support for image alt text and
   boolean run properties (bold, italic, underline and strikethrough).

#### 1.2.0

 * Include wp-image-* class when inserting images. This allows the WordPress editor
   to correctly identify the image and show appropriate editing options.
 * If an image has an alt text description in the original document, set the alt
   text in the media library when uploading that image.
 * If an image has an alt text description in the original document, use it to generate
   the filename.
 * Set image filename extension based on the image content type.
 * Show a message while the document is being inserted.

#### 1.1.0

 * Update mammoth.js to 1.1.0. This includes support for merged table cells and 
   content controls, such as bibliographies. This should also improve performance
   when converting larger documents.

#### 1.0.0

 * Update mammoth.js to 0.3.33. This includes better support for reading documents
   that use undefined styles, and generates simpler HTML in some cases.

#### 0.1.25

 * Update mammoth.js to 0.3.30. This includes better support for lists made in LibreOffice.
 * Fix JavaScript error on admin pages without editors.

#### 0.1.24

 * Update mammoth.js to 0.3.29. This improves support for mc:AlternateContent elements.

#### 0.1.23

 * Update mammoth.js to 0.3.28. This improves support for reading images.

#### 0.1.22

 * Update mammoth.js to 0.3.28-pre.1. Fixes newlines being inserted around inline
   elements when the editor is in text mode.

#### 0.1.21

 * Update mammoth.js to 0.3.27. Fixes recursive collapsing of HTML elements.

#### 0.1.20

 * Update mammoth.js to 0.3.26. Improves the collapsing of HTML elements, such as
   allowing collapsing elements generated by different runs.

#### 0.1.19

 * Update mammoth.js to 0.3.25-pre.1. Includes experimental support for embedded
   style maps.

#### 0.1.18

 * Update mammoth.js to 0.3.23. Includes support for links and images in footnotes
   and endnotes.

#### 0.1.17

 * Update mammoth.js to 0.3.22. Includes support for strikethrough.

#### 0.1.16

 * Update mammoth.js to 0.3.21. Includes basic support for text boxes.

#### 0.1.15

 * Update mammoth.js to 0.3.18. Includes support for hyperlinks to bookmarks in 
   the same document.
 * Add support for CKEditor.

#### 0.1.14

 * Support any post type that supports the WordPress editor.
 * Generate consistent footnote and endnote IDs based on the post ID.
 * Update mammoth.js to 0.3.15.

#### 0.1.13

 * Update mammoth.js to 0.3.14. Includes support for endnotes.

#### 0.1.12

 * Fix preview rendering on Chrome.
 * Update mammoth.js to 0.3.12.

#### 0.1.11

 * Update mammoth.js to 0.3.11. Includes support for superscript and subscript text.

#### 0.1.10

 * Update mammoth.js to 0.3.8. Includes support for line breaks.

#### 0.1.9

 * Remove old script reference.

#### 0.1.8

 * Update to mammoth.js 0.3.5. Includes support for tables.

#### 0.1.7

 * Update to mammoth.js 0.3.2. Includes support for footnotes.

#### 0.1.6

 * Update to mammoth.js 0.2.2
 * Pretty print HTML output
 * Hide inline image data in raw HTML preview

#### 0.1.5

 * Fix versions

#### 0.1.4

 * Fix readme.txt

#### 0.1.3

 * Update to the latest version of mammoth.js (0.2.1)

#### 0.1

 * Initial release

## Meta

 *  Version **1.22.0**
 *  Last updated **5 months ago**
 *  Active installations **20,000+**
 *  WordPress version ** 4.0 or higher **
 *  Tested up to **6.9.5**
 * Tags
 * [docx](https://wordpress.org/plugins/tags/docx/)[html](https://wordpress.org/plugins/tags/html/)
   [office](https://wordpress.org/plugins/tags/office/)[paste](https://wordpress.org/plugins/tags/paste/)
   [word](https://wordpress.org/plugins/tags/word/)
 *  [Advanced View](https://wordpress.org/plugins/mammoth-docx-converter/advanced/)

## Ratings

 4.8 out of 5 stars.

 *  [  59 5-star reviews     ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/?filter=2)
 *  [  2 1-star reviews     ](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/)

## Contributors

 *   [ Michael Williamson ](https://profiles.wordpress.org/michaelwilliamson/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/mammoth-docx-converter/)