---
title: "Convert DOCX documents into clean HTML for publishing workflows with Mammoth"
description: "Use Mammoth when an agent needs to turn a .docx file into simple HTML that preserves semantic structure instead of Word-specific styling. This is for ingestion and publishing workflows, not for full document editing or perfect visual fidelity."
verification: "security_reviewed"
source: "https://github.com/mwilliamson/mammoth.js"
category:
  - "Data Extraction & Transformation"
framework:
  - "Multi-Framework"
tool_ecosystem:
  github_repo: "mwilliamson/mammoth.js"
  github_stars: 6167
---

# Convert DOCX documents into clean HTML for publishing workflows with Mammoth

Use Mammoth when an agent needs to turn a .docx file into simple HTML that preserves semantic structure instead of Word-specific styling. This is for ingestion and publishing workflows, not for full document editing or perfect visual fidelity.

## Prerequisites

Node.js, DOCX files

## Installation

Choose whichever fits your setup:

1. Copy this skill folder into your local skills directory.
2. Clone the repo and symlink or copy the skill into your agent workspace.
3. Add the repo as a git submodule if you manage shared skills centrally.
4. Install it through your internal provisioning or packaging workflow.
5. Download the folder directly from GitHub and place it in your skills collection.

Install command or upstream instructions:

```
npm install mammoth
```

## Documentation

- https://mike.zwobble.org/projects/mammoth/

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/convert-docx-documents-into-clean-html-for-publishing-workflows-mammoth/)
