Mammoth .docx omzetter


Mammoth is designed to convert .docx documents, such as those created by Microsoft Word, 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.


If you’d like to say thanks, feel free to make a donation through Ko-fi.

If you use Mammoth as part of your business, please consider supporting the ongoing maintenance of Mammoth by making a weekly donation through Liberapay.


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.


20 augustus 2020
I've been writing a science/popular science book in Word. I had several alternative plans to get it on the Web, one as a PDF (Acrobat Pro preserves everything!... but some people don't like reading PDFs, at least not on a mobile device. I thought of the agony of putting text into the WordPress editor, loading all the images, placing them again in the text, and tweaking the formatting. Then I Googled "Word import docx into WordPress" and up came Mammoth docx converter. Wow! It preserved everything - images with original placement, indenting, bulleted lists, external links, and internal links! This saved me eons of work. Great job, Michael!
20 mei 2020
I have been searching for plugin who can paste or import a word doc to create a post in WordPress! and this is the only one works, thanks!
31 maart 2020
I just used this plug-in and it worked perfectly and saved me a bunch of time! Thanks for creating it!
11 december 2019
Way too long getting my praise out. It took me a long time finding "the best plugin in the planet" according to junglesub a year ago. Mammoth wiped away the sweat and mess of getting my Google Docs to sit pretty in the Word Press editor. I just download my prose from G Drive and big G converts it to Docx on my Chromebook. From there Mammoth needs a couple of clicks and my piece lands in the editor nice and cozy. No formatting issues! The plugin continues to work flawlessly for over a year now. Crazy how one bright dude, Michael Williamson, probably sipping a beer one night decided to deal with the problem. Thanks! My most important plugin.
27 september 2019
20 september 2019
Thank you so very much. This is the answer I've been looking for.
Lees alle 47 beoordelingen

Bijdragers & ontwikkelaars

“Mammoth .docx omzetter” is open source software. De volgende personen hebben bijgedragen aan deze plugin.


Vertaal “Mammoth .docx omzetter” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.



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


  • 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.


  • Update mammoth.js to 1.4.9.


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


  • Update mammoth.js to 1.4.8.


  • Add basic Gutenberg support.

  • Update mammoth.js to 1.4.7.


  • Fix IE11 support.


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


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


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


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


  • 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.


  • 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.


  • 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.


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


  • 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.


  • 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.


  • 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.


  • Update mammoth.js to 0.3.30. This includes better support for lists made in LibreOffice.

  • Fix JavaScript error on admin pages without editors.


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


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


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


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


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


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


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


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


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


  • Update mammoth.js to 0.3.18. Includes support for hyperlinks to bookmarks in the same document.

  • Add support for CKEditor.


  • 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.


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


  • Fix preview rendering on Chrome.

  • Update mammoth.js to 0.3.12.


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


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


  • Remove old script reference.


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


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


  • Update to mammoth.js 0.2.2

  • Pretty print HTML output

  • Hide inline image data in raw HTML preview


  • Fix versions


  • Fix readme.txt


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


  • Eerste release