convert-word-to-md

Convert Word .docx documents into Markdown files with extracted embedded images.

38.5k|4.9k|Updated Jun 11, 2025
One-click install
npx skills add https://github.com/github/awesome-copilot --skill convert-word-to-md
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convert-word-to-md
Source: https://github.com/github/awesome-copilot/tree/main/skills/convert-word-to-md
Command: npx skills add https://github.com/github/awesome-copilot --skill convert-word-to-md

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires markitdown[docx], and includes scripts (resource) and references (resource) components.

What problem does it solve?

Word .docx files are zipped XML bundles that cannot be reliably read as plain text, making it hard to analyze, summarize, search, or extract data from them. This Skill converts .docx documents into clean Markdown so their contents can be accurately processed.

Core Features & Use Cases

  • Single-file conversion: Convert one .docx file into a self-contained folder containing a Markdown file and an img/ directory of extracted embedded images.
  • Batch and recursive conversion: Process an entire folder of Word documents, optionally descending into subfolders, with per-document output folders.
  • Image extraction: Pull real image files out of the .docx package and rewrite Markdown image references to relative paths, replacing MarkItDown's truncated base64 placeholders.
  • Use Case: A user shares a folder of contracts and reports in .docx format and asks for a summary of each; the Skill converts every document to Markdown first so the content can be read and analyzed accurately.

Quick Start

Convert the attached report.docx to Markdown by running the bundled conversion script, then read the generated Markdown file to summarize its contents.

Frequently Asked Questions about convert-word-to-md

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a Word docx file to Markdown in Python?

Run the bundled convert_word_to_md.py script with the path to your .docx file. It uses Microsoft's MarkItDown library to produce a Markdown file and extracts embedded images into an img folder with relative references.

How do I batch convert a folder of Word documents to Markdown?

Pass the folder path to convert_word_to_md.py instead of a single file, and add --recursive to include subfolders. Each .docx gets its own output folder containing the Markdown file and any extracted images.

Does MarkItDown support legacy .doc files?

No, this conversion only supports the .docx format. Legacy binary .doc files must be re-saved as .docx first, for example via Word's File > Save As > Word Document (.docx) option.

Why does the conversion fail with ModuleNotFoundError: markitdown?

The markitdown package is not installed in the current Python environment. Install it with pip using the bundled requirements.txt, which pulls in markitdown[docx] including the mammoth parser for Word files.

What happens to images when converting docx to Markdown?

MarkItDown only emits truncated base64 placeholders, so the script extracts the real image files directly from the .docx package into an img folder and rewrites the Markdown references to relative paths like img/img001.png.