Draft2Doc ← All posts

How to Export Markdown to Word (DOCX)

How to convert a Markdown file into an editable Word document that works in Microsoft Word, Google Docs, and Pages.

Markdown is the ideal writing format — fast, clean, and portable. But most people you collaborate with use Word. Here's how to export a Markdown file to a proper .docx that holds up in Microsoft Word, Google Docs, and Pages.

Why Export Markdown to DOCX?

  • Collaboration: Editors and reviewers expect Word documents, not raw Markdown
  • Track changes: Word's track-changes feature is still the standard for document review workflows
  • Compatibility: .docx opens everywhere — Microsoft Word, Pages, Google Docs, LibreOffice
  • Editability: Recipients can modify the document, unlike PDF

Fastest Method: Use Draft2Doc

Draft2Doc converts Markdown to DOCX in the browser — no install, no account, no conversion server. Your file never leaves your device.

  1. Open Draft2Doc
  2. Click Open file and upload your .md file (or paste Markdown directly into the editor)
  3. Preview the document and adjust the style if needed
  4. Click the dropdown arrow next to Export and choose Word (DOCX)

The exported file uses real Word paragraph styles — Heading 1, Heading 2, Normal — so it's fully editable in Word without cleaning up inline CSS or HTML artifacts. Tables, code blocks, bold, italic, and list formatting all carry through correctly.

What Gets Preserved in the DOCX Export?

Markdown element DOCX output
# Heading 1Heading 1 paragraph style
## Heading 2Heading 2 paragraph style
**bold**Bold character formatting
*italic*Italic character formatting
`inline code`Monospace inline style
Fenced code blockCode block paragraph
Markdown tableNative Word table
Bullet / numbered listWord list style

Alternative: Pandoc (Command Line)

Pandoc is the most powerful command-line option for Markdown conversion:

pandoc input.md -o output.docx

You can supply a reference document with --reference-doc=template.docx to control styles and formatting. Pandoc gives precise control but requires installation and some command-line familiarity.

Common Issues When Converting Markdown to DOCX

Tables look wrong

Some converters output tables as plain text or HTML tables that Word doesn't render correctly. Draft2Doc generates native Word table markup (Open XML), so tables display properly in all Word-compatible apps.

Code blocks lose formatting

Inline code needs a monospace style to be legible. Make sure your converter handles fenced code blocks explicitly rather than converting them to plain paragraphs.

Heading styles are missing

If headings are just large bold text rather than proper Word heading styles, the document outline and table of contents won't work correctly. Draft2Doc uses native Word heading styles (Heading 1, Heading 2, etc.) so the document structure is preserved.

Frequently Asked Questions

Can I edit the DOCX after exporting?

Yes. The exported file is a standard .docx — fully editable in Microsoft Word, Google Docs, LibreOffice Writer, and Apple Pages.

Does the DOCX look the same as the preview?

Closely, yes. The preview in Draft2Doc uses the same typography and spacing settings that are written into the DOCX. Minor differences may appear due to how Word renders fonts versus the browser.

Is there a file size limit?

No. The DOCX export runs entirely in your browser using JavaScript, so there's no upload or server-side file size restriction.

Can I convert multiple Markdown files to DOCX?

Currently Draft2Doc handles one file at a time. For batch conversion, Pandoc with a shell script is the best option.