# Markdown to Word: 3 ways to get a clean .docx

> How to convert Markdown to Word: Pandoc with a reference document, Google Docs import, and online converters, plus what breaks in each and how to fix it.

Canonical: https://buk.press/blog/markdown-to-word

20 October 2026 · 4 min read

The most reliable way to convert Markdown to Word is Pandoc: run pandoc draft.md -o draft.docx, and add --reference-doc to apply your own Word styles. Without the command line, open the .md file in Google Docs and download it as a Word file. Either way, headings, lists, links and tables come across as real Word styles; page breaks and custom layout usually need fixing in Word.

You wrote it in Markdown because it's faster. Then the editor, the client or the publisher asks for a Word file, with tracked changes on. Copying the rendered text into Word loses the heading styles, and pasting the raw file leaves asterisks everywhere.

There are three good routes, and the right one depends on how often you'll do it.

## Which method should you use?

| Method | Best for | Styles control | Setup |
|---|---|---|---|
| Pandoc | Anything long, or a conversion you'll repeat | Full, via a reference document | Install once, one command |
| Google Docs | One-off conversions, no install | Google's defaults | None |
| Online converters | A short file, quickly | Little | None |

If the document is a book or a long report, or you'll send revisions, use Pandoc. If it's a two-page brief, Google Docs is fine.

## How do you convert Markdown to Word with Pandoc?

1. **Install Pandoc** from pandoc.org. It runs on Windows, macOS and Linux.
2. **Convert the file.** In a terminal, in the folder with your file:

```
<code>pandoc draft.md -o draft.docx</code>
```

1. **Open it in Word.** Markdown headings become Word's Heading 1, Heading 2 and so on, so the Navigation pane and an automatic table of contents work straight away.
2. **Apply your own styles (optional).** Make a copy of the output, change its styles in Word (fonts, sizes, spacing), save it as `reference.docx`, then convert with:

```
<code>pandoc draft.md --reference-doc=reference.docx -o draft.docx</code>
```

Every later conversion picks up those styles, so you set the look once. Several files can go into one document in order: `pandoc 01.md 02.md 03.md -o book.docx`. [Pandoc for books](https://buk.press/blog/pandoc-for-books) covers the rest of what it does.

## How do you convert Markdown to Word with Google Docs?

1. In Google Docs, go to **File > Open > Upload** and pick your `.md` file. It opens as a formatted document.
2. Check the headings and lists.
3. Go to **File > Download > Microsoft Word (.docx)**.

Google added Markdown import and export to Docs in 2024. There is nothing to install. The trade-off is styling: you get Google's defaults, and there is no reusable style template like Pandoc's reference document.

Online converters work the same way: upload, download. Read their privacy terms before you upload an unpublished manuscript.

## What breaks when you convert Markdown to Word?

| Element | What happens | Fix |
|---|---|---|
| Headings, bold, italic, lists | Convert cleanly to Word styles | None needed |
| Links | Become clickable Word links | None needed |
| Tables | Convert, with basic styling | Restyle in Word, or set the table style in the reference doc |
| Images | Embedded if the path resolves | Use paths relative to the Markdown file |
| Page breaks | Usually lost | Insert them in Word, or style headings to start on a new page |
| Footnotes | Pandoc converts `[^1]` to real Word footnotes | Other converters may print them as text |
| Raw HTML | Mostly dropped | Remove it before converting |

The biggest gap is the page. Markdown has no page model, so the Word file has no layout decisions in it: page size, margins and headers are whatever Word defaults to. Set those in the reference document once.

## Do you need Word at all?

Often the Word file is a waypoint: the editor reviews it with tracked changes, you accept the edits, and the final version still has to become a PDF or an ebook. If so, two habits save work:

- **Keep the Markdown as the master copy.** After the edit, bring the changes back with [Word to Markdown](https://buk.press/blog/word-to-markdown) instead of continuing in Word.
- **Make the final file from the Markdown.** [bukpress](https://buk.press/markdown-to-pdf) turns the Markdown into a typeset A4 PDF, and into an EPUB, with the fonts, margins and page breaks set by rules rather than by hand.

To be clear: bukpress does not export Word files. When a .docx is the deliverable, Pandoc is the better tool. When the deliverable is a PDF and Word was only the plan for getting there, you can skip the conversion.

## Common questions

### Can Word open a Markdown file?

Not as a formatted document: you get the raw text with its symbols. Convert it first with Pandoc or Google Docs.

### Is there a Pandoc alternative without the command line?

Google Docs import works for single files. Some editors, such as Typora and VS Code extensions, export to Word, and many call Pandoc behind the scenes.

### How do I keep my Word styles when converting from Markdown?

Use Pandoc's `--reference-doc` option with a Word file whose styles you've set. The converted file uses those styles.

### Can I convert Markdown to Word with track changes?

No converter adds tracked changes. Convert the file, then turn on Track Changes in Word before the editor starts.

**About this article.** Written by the team that builds bukpress, which turns Markdown into print-ready PDF and EPUB books. Spotted something wrong or out of date? Write to [support@buk.press](mailto:support@buk.press).

## Read next

Tools 4 September 2026 · 4 min read

## [Word to Markdown: converting a manuscript cleanly](https://buk.press/blog/word-to-markdown)

Pandoc converts a .docx to Markdown in one command and gets the structure right about 90 percent of the time. The remaining 10 percent is the part that matters: direct formatting that was never a real heading, smart quotes, tracked changes, embedded images and Word's own list numbering. Budget an hour of cleanup, once, and you never do it again.

[Read it](https://buk.press/blog/word-to-markdown)

Tools 30 August 2026 · 5 min read

## [Pandoc Markdown to PDF: the commands, and where it stops](https://buk.press/blog/pandoc-for-books)

To convert Markdown to PDF with Pandoc, install Pandoc and a PDF engine (a LaTeX distribution such as TeX Live or MiKTeX, or an alternative like Typst or WeasyPrint), then run pandoc input.md -o output.pdf. Add --pdf-engine=xelatex to use your own fonts, -V geometry:margin=2.5cm for margins and --toc for a contents page. Pandoc is the best tool for documents with citations, cross-references or mathematics, and for books built by a script; it stops being pragmatic when the requirements are visual, because every visual change means LaTeX or a template.

[Read it](https://buk.press/blog/pandoc-for-books)

Explainers 30 August 2026 · 4 min read

## [Google Docs, Word or Markdown: what to write a book in](https://buk.press/blog/google-docs-vs-markdown)

Write in Google Docs if other people need to comment on the draft while you write it, in Word if an editor or publisher will hand you tracked changes, and in Markdown if the same manuscript has to become several finished formats without being reformatted each time. Most people who finish books use two of the three, in sequence.

[Read it](https://buk.press/blog/google-docs-vs-markdown)

## Write it in Markdown. Ship a book.

bukpress turns the file you are already writing into a typeset PDF and EPUB: your type, your covers, no watermark, ever.

[Get Lifetime, $27 once](https://app.buk.press/signup)
