TutorialPopularBeginner

How to Convert Markdown to Word: 4 Ways Compared

Written by Last updated

Published 7 min read

Markdown is one of the most popular formats for writing GitHub README files, technical documentation, developer guides, knowledge bases, and personal notes. Lightweight. Easy to version with Git. Works across pretty much every documentation tool out there.

Not everyone works in Markdown, though. Clients don't. Neither do most business teams. They open a .docx file, expect to leave comments, run Track Changes, maybe reformat a heading, and get on with their day.

There are a few ways to bridge that gap. Pandoc on the command line if you're comfortable there. A plugin in your editor, or one inside Word itself. Google Docs, which can now paste Markdown. Or a browser converter, which is what most people end up using, since there's nothing to install. Each one is the right answer for someone. This guide shows which one is right for you.

New to Markdown itself? Our beginner's guide to Markdown covers the syntax in a few minutes.

Key takeaways#

  • For a one-off file, an online converter is the quickest: paste, preview, download.
  • Pandoc is better for repeat jobs, your own Word template, local images, citations and math.
  • Google Docs can paste Markdown and then download it as a Word file.
  • Most VS Code and Obsidian export plugins run Pandoc underneath, so you still install Pandoc.
  • Whatever you use, check tables, images and code blocks before you send the file.

Why convert Markdown to Word?#

Markdown is great for writing and maintaining documentation. But there's a point where a Word document is just more practical. Usually because that's what the next person in line expects, not because Markdown did anything wrong.

Think about who's actually going to touch the file after you. A client who's never opened a .md file. A reviewer who wants to leave comments and run Track Changes instead of commenting on a pull request. A professor who asked for a .docx submission and means it. A teammate on the business side who'd rather not learn what a fenced code block is. In every one of these, the fastest path is just giving them what they already know how to use.

If your reader lives in Word or Google Docs, exporting as DOCX is the path of least resistance.

The four ways at a glance#

Method What you install Local images Math as Word equations Own Word styles Best for
Online converter Nothing No, public link needed Check by hand Restyle afterwards One file, right now
Pandoc Pandoc (free) Yes Yes Yes, reference document Repeat jobs, long or academic documents
Google Docs Nothing (Google account) No No Restyle afterwards Teams already in Docs
Editor plugins Plugin, usually plus Pandoc Yes Yes, through Pandoc Usually People who write in VS Code or Obsidian

Method 1: An online converter#

This is the quickest route for a single file. Open the Markdown to Word converter, paste your Markdown or upload an .md file, check the live preview, and click Download Word. The file opens in Word, Google Docs or LibreOffice Writer and stays fully editable. The conversion runs in your browser, so the text isn't uploaded anywhere.

Before downloading, check the preview while it's still easy to fix. Headings in the right order. Lists nested the way you meant them, not flattened. Tables with the right number of columns. Links actually pointing where they say they do. Code blocks still readable.

Good for: README files, reports, text copied from ChatGPT or Claude, anything you need to send today.

Watch out for: images must be public PNG, JPG, JPEG, GIF or BMP links. Images stored on your computer become a clickable [Image] link instead. LaTeX equations and Mermaid diagrams may need fixing by hand in Word.

Method 2: Pandoc#

Pandoc is a free command-line converter for Windows, macOS and Linux. It's also a tool you have to install and learn, which is a lot for converting one file. Once it's set up, though, it does things a browser tool can't. Install it from pandoc.org, or with brew install pandoc on a Mac. On Windows, run winget install --id JohnMacFarlane.Pandoc or use the installer from the same page.

The basic command:

pandoc input.md -o output.docx

For a GitHub README file, tell Pandoc to read GitHub-flavored Markdown, so task lists and tables come through as GitHub shows them:

pandoc -f gfm README.md -o README.docx

Use your own Word styles. This is Pandoc's best feature. First save Pandoc's default style file:

pandoc -o custom-reference.docx --print-default-data-file reference.docx

Open custom-reference.docx in Word, change the styles you care about (Normal, Heading 1, Heading 2 and so on), and save it. Then convert with it:

pandoc input.md --reference-doc=custom-reference.docx -o output.docx

Every document you convert this way comes out in your house style. The full list of options is in the Pandoc manual.

Add a table of contents with --toc. If it looks empty when you open the file, right-click it in Word and choose Update Field.

Convert a whole folder (macOS or Linux):

for f in *.md; do pandoc "$f" -o "${f%.md}.docx"; done

On Windows (PowerShell):

Get-ChildItem *.md | ForEach-Object { pandoc $_.FullName -o ($_.BaseName + ".docx") }

Good for: the same conversion every week, a company template, documents with local images, citations or math.

Watch out for: image paths are read relative to the folder you run the command from. If images go missing, run Pandoc from the Markdown file's folder.

Using Pandoc from Python#

If the conversion is part of a script or an app, the pypandoc package wraps Pandoc. The pypandoc_binary version includes Pandoc itself, so there's nothing else to install:

pip install pypandoc_binary
import pypandoc

pypandoc.convert_file("input.md", "docx", outputfile="output.docx")

Method 3: Google Docs#

If your team already lives in Google Docs, you may not need a converter at all. Go to Tools > Preferences and turn on Enable Markdown. Copy your Markdown, open a document, and choose Edit > Paste from Markdown (or right-click and choose Paste from Markdown). When it looks right, go to File > Download > Microsoft Word (.docx).

Good for: shared documents your team will keep editing in Docs.

Watch out for: images from your computer don't come across, and code blocks and complex tables can need tidying before you download.

Method 4: Editor plugins and Word add-ins#

If you write in VS Code, extensions such as Markdown Preview Enhanced can export straight to Word. Obsidian has a Pandoc plugin that does the same. Most of these call Pandoc behind the scenes, so you install Pandoc once and then export from the editor's menu.

Writage works the other way round. It adds Markdown support inside Word, so you can open an .md file in Word and save it back. It's Windows-only. Without an add-in like this, Word opens a .md file as plain text, symbols and all.

Good for: people who already write in that editor every day.

Watch out for: plugin settings vary, and export usually fails until Pandoc is installed.

Which one should you use?#

  • One file, nothing installed: an online converter.
  • The same conversion every week, or a company template: Pandoc with a reference document.
  • A paper with citations or equations: Pandoc. The manuscript checklist walks through it.
  • Your team works in Google Docs: Paste from Markdown, then download.
  • You write in VS Code or Obsidian all day: the editor plugin.
  • The file is final and nobody should edit it: save it as a PDF instead.

What breaks, whatever method you use#

Most Markdown converts without extra work. A few habits still make the output easier to edit afterward:

  • Use a logical heading hierarchy (#, ##, ###) so Word builds a properly structured document.
  • Leave blank lines between paragraphs and sections.
  • Review wide tables and tables with long cell text after conversion.
  • Use fenced code blocks for code snippets so they stay readable.
  • Check images and external links before sharing the final file.
  • Mermaid diagrams and GitHub alerts (> [!NOTE]) have no direct Word equivalent. Export diagrams as images first, and expect alerts to turn into plain quotes.

Going the other way#

Got the Word file back with edits? Pandoc converts it back too:

pandoc edited.docx -t gfm -o edited.md

Prefer the browser? Turn the .docx back into Markdown without installing anything.

Frequently asked questions

  1. 1

    What is the easiest way to convert Markdown to Word?

    An online converter. Paste the Markdown, check the preview and download a .docx, with nothing to install. If you convert the same kind of document often, or need your own Word styles, Pandoc is worth setting up.

  2. 2

    How do I make Pandoc use my own Word styles?

    Save Pandoc's default reference file with pandoc -o custom-reference.docx --print-default-data-file reference.docx, change its styles in Word, then add --reference-doc=custom-reference.docx to your command.

  3. 3

    Can Google Docs convert Markdown to Word?

    Yes, in two steps. Turn on Enable Markdown under Tools > Preferences, use Edit > Paste from Markdown, then File > Download > Microsoft Word (.docx).

  4. 4

    Which method handles math equations best?

    Pandoc. It turns LaTeX math such as $E = mc^2$ into real Word equations you can edit. Browser converters and Google Docs usually don't, so check equations by hand there.

  5. 5

    Why would my formatting need adjustment instead of converting perfectly?

    Because "perfectly" isn't really a thing here. Headings, paragraphs, lists, tables, links and code convert cleanly almost every time. What trips up is anything without a clean Word equivalent: deeply nested structures, Mermaid diagrams, LaTeX equations, GitHub-flavored alerts. Preview before you download and you'll catch most of it.

← Back to guides