MarkdownPaper Open reader

Guide

Markdown to Word

Word does not read Markdown: paste it in and you get the # and ** symbols, not the formatting. To keep the formatting, turn the Markdown into a page first and copy that, or convert the whole file to a .docx.

You write

## Meeting notes

**Decision:** ship on Friday.

| Owner | Task          |
| ----- | ------------- |
| Sam   | Release notes |

You see

Meeting notes

Decision: ship on Friday.

OwnerTask
SamRelease notes

The left side is what Word shows if you paste the Markdown. The right side is what you want in the document.

On this page

Copy it as formatted text

Best for a section or a short document.

  1. Open or paste the Markdown in a reader such as MarkdownPaper.
  2. Choose Copy as formatted text from the share menu, or select part of the page and copy it.
  3. Paste into Word.

Headings, bold and italic, lists, links, quotes and tables arrive as Word formatting. Code blocks arrive as monospaced text. Check the result once, since Word applies its own spacing.

Convert a whole file with Pandoc

Best for long documents, many files, or anything with math.

pandoc report.md -o report.docx

Pandoc turns headings into Word's own heading styles, so Word's navigation pane and table of contents work, and it turns LaTeX math into real Word equations. To use your own fonts and margins, give it a Word file styled the way you like:

pandoc report.md --reference-doc=template.docx -o report.docx

Add -f gfm if the file is GitHub Flavored Markdown.

What survives

ContentCopy as formatted textPandoc
HeadingsYesYes, as heading styles
Lists and linksYesYes
TablesYesYes
Code blocksAs monospaced textYes, with a code style
MathNot reliablyYes, as Word equations
Mermaid diagramsNot reliablyShown as code

For a document full of math or diagrams that only needs reading, not editing, a PDF keeps everything exactly. See Markdown to PDF.

Google Docs is a different route

Google Docs can open a .md file and download a document as Markdown, and it can paste Markdown as formatting once that is turned on in its preferences. The guide to copying Markdown into Google Docs covers it, and a Google Doc can be downloaded as a .docx afterwards.

Common problems

  • Word shows the symbols. The Markdown was pasted as text. Copy it from a rendered page instead.
  • Word's contents list misses some headings. Check that each heading uses one of Word's Heading styles. Pandoc always sets them.
  • Spacing looks different from the screen. Word uses its own paragraph spacing. Adjust the styles once, or use a reference document with Pandoc.

Questions

Can Word open a Markdown file?

It opens a .md file as plain text, with the symbols showing. Convert it first to get formatting.

How do I convert Markdown to Word for free?

Copy the rendered page from a free reader as formatted text and paste it into Word, or use Pandoc, which is free and converts whole files.

How do I convert Markdown to .docx?

Run pandoc file.md -o file.docx. Pandoc works out the format from the file name.

Next