Skip to content

Markdown to Word DOCX converter

Markdown to DOCX runs through our document engine, mapping Markdown structure to Word styles and optionally using a reference DOCX template.

  • Converted with Document engine · input deleted within 24 h
  • Free: 5 conversions a day · 5 MB each
  • Higher limits →

From real runs

What you get — and what changes

  • Headings Kept

    Markdown # through ###### map to Word Heading 1 through Heading 6 styles.

  • Paragraphs Kept

    Plain Markdown paragraphs become editable Word paragraphs with the default body style.

  • Code blocks Kept

    Fenced code blocks become Word content styled with the Source Code style.

  • Tables Kept

    Pipe tables become Word tables; alignment metadata is basic and column widths are recalculated by Word.

  • Images Kept

    Images are embedded when the referenced local path or URL is reachable during conversion.

  • Raw HTML Changed

    Inline HTML can be interpreted or dropped depending on whether our document engine has a Word equivalent.

  • Corporate styles Changed

    A referenceDoc can supply corporate styles; without it, our document engine's default DOCX styling is used.

Sample conversions

Engineering design note

Input
5,200-word Markdown design note with H2 sections, TypeScript code fences, two pipe tables, and relative PNG diagrams.
Output
The DOCX opened with Word heading styles, Source Code blocks, editable tables, and embedded diagrams. One wide table overflowed the page until its columns were resized.

Corporate memo template

Input
Markdown memo with front-matter title, numbered sections, callout blockquotes, and a supplied reference DOCX.
Output
Headings used the template's styles and numbering. Blockquotes became indented paragraphs, not the company's shaded callout component.

README with badges

Input
Repository README with badges, fenced shell commands, task lists, and relative links to other Markdown files.
Output
Badges embedded when their URLs were reachable, code was readable, and links stayed clickable. Task-list checkboxes became plain list text.

A real Markdown → Word DOCX run

We converted our Markdown sample (472 B) with Document engine on 2026-09-11. It took 27 ms and produced a 11 KB Word DOCX file, 24× larger than the input. The engine raised no warnings.

Input · sample.md · 472 B

3 headings, 1 table, 4 list items, 0 code blocks, 0 image references

Headings
3
Tables
1
List items
4
Code blocks
0
Images
0
Lines
13

Output · sample.docx · 11 KB

Word document: 18 paragraphs, 3 headings, 1 table, 0 embedded images; fonts Consolas

Paragraphs
18
Headings
3
Tables
1
Images
0
Archive parts
16
Fonts
Consolas

Options and when to change them

referenceDoc
Use a corporate template DOCX when heading, body, table, and code styles must match your Word house style.
toc
Add when the Word document should include a generated table of contents from Markdown headings.
pageSize
Set when the output should be Letter or A4 regardless of the reference document default.
margins
Set when the DOCX needs explicit print margins and no reference document supplies them.

Do it yourself

pandoc

bash
pandoc in.md -o out.docx --reference-doc=template.docx

Images must be reachable from the command's working directory or via allowed URLs.

pandoc

bash
pandoc in.md -o out.docx --toc

The default pandoc template is serviceable, but it will not match a corporate Word template without referenceDoc.

Markdown to Word DOCX by API or MCP

The HTTP API and the MCP server run the exact engine this page uses (Document engine); the response carries the same warnings the web converter shows. Check support first with GET /api/v1/pairs?from=md&to=docx.

curl
curl -X POST https://filetypeconverters.com/api/v1/convert \
  -H "Authorization: Bearer $FTC_API_KEY" \
  -F "file=@input.md" -F "from=md" -F "to=docx" \
  --output output.docx
API reference

When this is the wrong conversion

  • If the source Markdown contains browser-only diagrams such as Mermaid, render those diagrams first and reference images.
  • If the final deliverable is fixed layout, convert Markdown to PDF instead of DOCX.
  • If the Markdown is mostly tabular data, use a spreadsheet format rather than Word tables.

Markdown to Word DOCX questions

Which Word styles do Markdown headings use?

Our document engine maps # through ###### to Word Heading 1 through Heading 6, so Word's navigation pane and table of contents can use them.

How do I make the DOCX match our company template?

Provide a referenceDoc. Our document engine reads styles from that DOCX and applies them to the generated document structure.

Are Markdown images embedded in Word?

Yes when the image path or HTTPS URL can be reached during conversion. Broken relative paths become missing images.

What happens to fenced code blocks?

They become Word paragraphs styled as Source Code, with syntax text kept but not necessarily your editor's theme colors.