NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4210 most downloaded on npm
Convert Word documents from docx to simple HTML and Markdown
Last release 8 days ago
26 Sep 2026
Release timing varies
gaps range from 2 weeks to 7 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
102 releases · first in 2013
This is arguably a breaking change: however, the return value of functions such as convertToHtml() was only documented as a promise, rather than as a…
Replace the use of bluebird with native promises.
This is arguably a breaking change: however, the return value of functions such as convertToHtml() was only documented as a promise, rather than as a bluebird promise.
The only exception is that the docs previously used .done(): therefore, when returning promises from the API to external users, a done method is added.
Any callers that rely on bluebird promises can convert the returned promise into a bluebird promise using bluebird.Promise.resolve().
Read the children of w:customXml elements.
Handle paragraphs and runs that have been moved and tracked as a revision.
Improve escaping in Markdown writer. This avoids some cases where source documents could inject arbitrary HTML into the converted document.
Avoid excessive backtracking when parsing an unterminated string with many escape sequences. The previous behaviour would allow maliciously crafted do
Avoid excessive backtracking when parsing an unterminated string with many escape sequences. The previous behaviour would allow maliciously crafted documents to cause a denial of service.
Note that it is still strongly recommended to process untrusted documents in a separate thread with a timeout to avoid potential similar issues.
Handle complex field separator and end characters without corresponding start characters.
One column per quarter.
Avoid prototype pollution when reading the styles defined in a document. This avoids an issue where a maliciously crafted document could be used to se
Fix: on Windows, when an image's content type includes a backslash in the subpart, files may be written outside of the directory set by --output-dir.
Fix: on Windows, when an image's content type includes a backslash in the subpart, files may be written outside of the directory set by --output-dir.
Detect and ignore numbering levels that use numStyleLink to refer to themselves.
Handle hyperlinked wp:anchor and wp:inline elements.
Handle hyperlinked wp:anchor and wp:inline elements.
Handle hyperlink complex fields with unquoted hrefs.
Ignore style definitions using a style ID that has already been used.
Ignore style definitions using a style ID that has already been used.
Disable external file accesses by default. External file access can be enabled using the externalFileAccess option.
Handle numbering levels defined without an index.
Add "Heading" and "Body" styles, as found in documents created by Apple Pages, to the default style map.
Add "Heading" and "Body" styles, as found in documents created by Apple Pages, to the default style map.
Handle structured document tags representing checkboxes wrapped in other elements, such as table cells. Previously, the wrapping elements would have been ignored.
Ignore deleted table rows.
Add notes on security.
Revert the change to explicitly use commonjs modules. This appeared to cause issues with some bundlers such as webpack when using mammoth.browser.js.
Ignore AlternateContent elements when there is no Fallback element.
Ignore AlternateContent elements when there is no Fallback element.
Explicitly use commonjs modules. Since the modules should have previously been implicitly treated as commonjs modules, this shouldn't affect behaviour.
Update lop to 0.4.2, which removes the use of the util module when there are errors during parsing. This should remove the need to polyfill util in th
Update lop to 0.4.2, which removes the use of the util module when there are errors during parsing. This should remove the need to polyfill util in the browser.
Detect checkboxes, both as complex fields and structured document tags, and convert them to checkbox inputs.
Add style mapping for highlights.
Remove the use of the path module from common code used by browser builds. This should remove the need to polyfill path in the browser.
Handle numbering level definitions without an explicit format.
Handle numbering level definitions without an explicit format.
Switch the precedence of numbering properties in paragraph properties and the numbering in paragraph styles so that the numbering properties in paragraph properties takes precedence.
Support attributes in HTML paths in style mappings.
Support attributes in HTML paths in style mappings.
Improve error message when failing to find the body element in a document.
Add support for the strict document format.
Add transformDocument to the TypeScript declarations.
Add transformDocument to the TypeScript declarations.
Support merged paragraphs when revisions are tracked.
Use xmldom instead of sax to parse XML documents. This should remove the need to polyfill stream in the browser.
Adjust the internal implementation to remove the use of Buffer on the critical path, and provide APIs to read images and documents with embedded style maps without using Buffer. This should remove the need to polyfill Buffer in the browser. Since TextDecoder is now used, the minimum version of node.js is now v12.
Remove the use of the util module. This should remove the need to polyfill util in the browser.
Fix: npm 7 changed the behaviour of prepublish, causing the browser build not to be updated before publishing to npm. We now use prepare instead of pr
Only use the alt text of image elements as a fallback. If an alt attribute is returned from the function passed to mammoth.images.imgElement, that val
Ignore w:u elements when w:val is missing.
* Add TypeScript declarations.
Update JSZip to 3.2.0. This addresses CVE-2021-23413 in JSZip.
When extracting raw text, convert tab elements to tab characters.
Handle internal hyperlinks created with complex fields.
Update JSZip to 3.2.0. This addresses CVE-2021-23413 in JSZip.
Handle w:num with invalid w:abstractNumId.
Convert symbols in supported fonts to corresponding Unicode characters.
Support numbering defined by paragraph style.
Add style mapping for all caps.
Use package-lock.json instead of npm-shrinkwrap.json.
Handle underline elements where w:val is "none".
Re-publishing to remove superfluous files.
* Read font size for runs. * Support soft hyphens.
Allow hyperlinks to be collapsed.
Improve list support by following w:numStyleLink in w:abstractNum.
* Update xmlbuilder dependency.
Fix: default style mappings caused footnotes, endnotes and comments containing multiple paragraphs to be converted into a single paragraph.
When using the pretty HTML writer, don't format HTML inside pre elements.
When using the pretty HTML writer, don't format HTML inside pre elements.
Read the children of v:rect elements.
Read part paths using relationships. This improves support for documents created by Word Online.
Parse paragraph indents.
Read part paths using relationships. This improves support for documents created by Word Online.
Add style mapping for small caps.
Add style mapping for small caps.
Add style mapping for tables.
Read children of v:group elements.
Read w:noBreakHyphen elements as non-breaking hyphen characters.
Extract the default data URI image converter to the images module.
Extract the default data URI image converter to the images module.
Add anchor on hyperlinks as fragment if present.
Convert target frames on hyperlinks to targets on anchors.
Detect header rows in tables and convert to thead > tr > th.
Handle complex fields that do not have a "separate" fldChar.
* Add transforms.run.
Read children of w:object elements.
Handle hyperlinks created with complex fields.
Handle absolute paths within zip files. This should fix an issue where some images within a document couldn't be found.
Add getDescendants() and getDescendantsOfType() to transforms module.
Add getDescendants() and getDescendantsOfType() to transforms module.
Add font property to runs.
Allow style names to be mapped by prefix. For instance:
Allow style names to be mapped by prefix. For instance:
r[style-name^='Code '] => code
Add default style mappings for Heading 5 and Heading 6.
Allow escape sequences in style IDs, style names and CSS class names.
Allow a separator to be specified when HTML elements are collapsed.
Add includeEmbeddedStyleMap option to allow embedded style maps to be disabled.
Include embedded styles when explicit style map is passed.
Ignore bold, italic, underline and strikethrough elements that have a value of false or 0.
Ignore v:imagedata elements without relationship ID with warning.
Expect end token when parsing style mappings. This causes warnings to be emitted instead of silenting ignoring unparsed tokens.
Ignore blank lines in style map.
Use alt text title as alt text for images when the alt text description is missing entirely.
Throw more informative error when word/document.xml cannot be found.
Throw more informative error when word/document.xml cannot be found.
Generate messages of type "error" instead of "warning" when image conversion throws an exception.
Use alt text title as alt text for images when the alt text description is blank.
* Add support for comments.
Add support for w:sdt elements. This allows the bodies of content controls, such as bibliographies, to be converted.
Add support for w:sdt elements. This allows the bodies of content controls, such as bibliographies, to be converted.
Avoid stack overflows when elements have many children.
Actually add support for table cells spanning multiple rows.
Add support for table cells spanning multiple rows.
Add support for table cells spanning multiple columns.
Remove deprecated convertUnderline option.
Remove deprecated convertUnderline option.
Officially support ID prefixes.
Generated IDs no longer insert a hyphen after the ID prefix.
The default ID prefix is now the empty string rather than a random number followed by a hyphen.
Rename mammoth.images.inline to mammoth.images.imgElement to better reflect its behaviour.
Improve collapsing of elements when there are empty elements.
Allow bold and italic style mappings to be configured.
Handle references to missing styles when reading documents.
Improve support for lists made in LibreOffice. Specifically, this changes the default style mapping for paragraphs with a style of "Normal" to have th
Improve support for lists made in LibreOffice. Specifically, this changes the default style mapping for paragraphs with a style of "Normal" to have the lowest precedence.
Replace nomnom with argparse for CLI argument parsing. Usage should be the same, but unknown arguments will now cause an exit with failure rather than being ignored.
Your coding agent can read these notes before it upgrades. Set up the MCP server →