MDUtil

Word to Markdown Converter

Open a Word document and get clean Markdown with its headings, lists, tables, links and images. The file is converted in your browser and never uploaded.

Word document

Drop a file here or choose one

A .docx file up to 50 MB

Choose a file
Open a Word file to see its Markdown here.
0 characters0 lines

What it handles

Word styles become Markdown
Heading 1 to 6, Title, Quote and Code styles turn into Markdown headings, quotes and code.
Lists and tables
Bulleted and numbered lists keep their nesting, and tables become pipe tables with the first row as the header.
Images kept
Pictures are saved in an images folder next to the Markdown, or embedded in it as data URLs.
Links, footnotes and emphasis
Links, footnotes, bold, italics and strikethrough come through, and empty paragraphs are dropped.
Any editor's .docx
Documents saved by Word, Google Docs, LibreOffice, Pages and WPS Office convert the same way.
Stays on your device
The document is read in your browser, so confidential files never leave your computer.

Convert Word to Markdown from the command line

Pandoc

--extract-media saves the pictures in a media folder and links them from the Markdown.

pandoc report.docx -t gfm --extract-media=. -o report.md

JavaScript

mammoth reads the .docx as HTML, and Turndown writes that HTML as Markdown.

import mammoth from "mammoth";
import TurndownService from "turndown";

const { value: html } = await mammoth.convertToHtml({ path: "report.docx" });
const markdown = new TurndownService({ headingStyle: "atx" }).turndown(html);

MarkItDown

Microsoft's MarkItDown converts Word, PDF and PowerPoint files for language models.

pip install 'markitdown[docx]'
markitdown report.docx -o report.md

Questions and answers

How do I convert a Word document to Markdown?

Open the .docx file above and copy or download the Markdown on the right. Choose Separate files to get the pictures too, as a .zip with the Markdown and an images folder.

What happens to the images?

With Separate files, each picture is saved as images/image-1.png and so on, and the .zip holds the Markdown and the folder. Inside the Markdown embeds them as data URLs in one file, and Leave out drops them.

Can I convert a .doc file?

Not directly. .doc is Word's older binary format; open it in Word, LibreOffice or WPS Office, save it as .docx and open that here.

Why is some formatting missing?

Markdown has no syntax for colors, fonts, underline or page layout, so those are dropped, and comments are left out. Headings, lists, tables, links and emphasis are kept.

How do I convert a Google Doc?

Download it with File → Download → Microsoft Word (.docx) and open it here, or copy the text into the Rich Text to Markdown converter.

Is my document uploaded anywhere?

No. The conversion runs in your browser, so the document never leaves your device.