The best way to convert Word to Markdown is to run the .docx file through Pandoc, which maps heading styles, lists, links and tables to Markdown syntax in one command. If you cannot install software, you can also route the file through Google Docs or copy the text into an editor that converts pasted content. This guide compares the methods and shows how to protect your structure.
Key takeaways
- Pandoc gives the most accurate conversion from DOCX to Markdown.
- Real Word styles (Heading 1, List Bullet) convert far better than manual formatting.
- Extract images to a folder so the Markdown can link to them.
- Tracked changes, comments, text boxes and complex tables need attention.
Prepare the Word Document
Structure survives conversion only if it exists in the first place. Before you start, open the Word file and check three things.
- Headings use the built-in Heading styles from the Styles gallery rather than large bold text.
- Lists use Word’s bullet and numbering buttons, not typed hyphens or numbers.
- Tracked changes are accepted or rejected, so you convert the version you want.
Make a backup copy of the document first. Conversion only reads the file, but cleaning styles in the original is safer on a copy.
Method 1: Convert Word to Markdown With Pandoc
Install Pandoc from pandoc.org, open a terminal in the folder with your file and run:
pandoc report.docx -f docx -t gfm --wrap=none --extract-media=./media -o report.md
| Part of the command | Purpose |
|---|---|
-f docx |
Reads a Word document |
-t gfm |
Writes GitHub Flavored Markdown with pipe tables |
--wrap=none |
Avoids hard line breaks in paragraphs |
--extract-media=./media |
Saves embedded pictures and links to them |
If the document contains tracked changes, add --track-changes=accept to keep the accepted text, or --track-changes=all to keep revisions as markup. Full details are in the Pandoc manual.

Method 2: Go Through Google Docs
If you already live in Google Drive, upload the .docx, open it with Google Docs and export from there. At the time of writing Docs offers a Markdown download in the File, Download menu, though menus may change. The full walkthrough is in our guide to converting Google Docs to Markdown. This route needs no installation, but you have less control over images and line wrapping than with Pandoc.
Method 3: Copy and Paste Into a Markdown Editor
Some Markdown editors convert pasted rich text into Markdown automatically, and some offer a “paste as Markdown” command. Copy a section from Word, paste it, and compare the result with the original. This works well for short pieces, but results differ between editors, so test with one page before you commit to the method. Our overview of the best Markdown editors can help you choose one.
Which Method Keeps the Most Structure?
| Method | Headings and lists | Tables | Images |
|---|---|---|---|
| Pandoc | Excellent when styles are used | Good for simple tables | Extracted to a folder |
| Via Google Docs | Good | Good for simple tables | Check manually |
| Paste into editor | Varies by editor | Varies | Often missing |
A Quick Before and After Example
Seeing a small sample makes it easier to judge a conversion. Suppose a Word file has a Heading 2 called “Project Goals”, a bulleted list and a hyperlink. Pandoc would typically produce something like this:
## Project Goals
- Reduce report turnaround time
- Share drafts in one place
- Keep a record of every change
See the [style guide](https://example.com/style) for details.
If your output instead shows bold lines with no hash signs, the source did not use heading styles. If the bullets appear as plain paragraphs starting with a dot, they were typed by hand. In both cases, fix the Word file and convert again rather than repairing the Markdown line by line, because the fix then applies to every future conversion.
Clean Up After Conversion
Even a good conversion leaves small jobs. Read the Markdown file in a plain text editor, then work through this checklist.
- Headings: confirm the levels are in order, with one H1 and no skipped steps.
- Tables: Markdown pipe tables cannot hold merged cells or multiple paragraphs per cell. Rebuild those as simpler tables or HTML.
- Footnotes: Pandoc converts Word footnotes to Markdown footnotes in many flavors. Check that your target tool supports them.
- Special characters: curly quotes and long dashes are fine in UTF-8, but escaped symbols with backslashes may need removal.
- Text boxes and shapes: these rarely convert, so copy their text by hand.
When the file is clean, commit it to version control so you can track later edits, as described in our piece on Git basics for writers.

Frequently Asked Questions
Can Word save a document as Markdown?
Word has no standard Markdown export at the time of writing. Use Pandoc or another converter instead.
Why are my headings missing?
The source probably uses manual formatting instead of heading styles. Apply the built-in styles in Word and convert again.
Will images come across?
With Pandoc, yes, if you add --extract-media. Without it, images are not saved as separate files.
Is Pandoc safe for confidential documents?
Pandoc runs locally on your computer, so your file is not uploaded anywhere. That is one reason people prefer it over online tools for private files.
What about .doc files?
Pandoc reads .docx, not the older .doc format. Open the old file in Word and save it as .docx first.
Wrap-Up
Pandoc is the first tool to try when you need Markdown from Word, because it respects styles and handles images and lists cleanly. Prepare the document with real styles, convert, and use the checklist above to tidy tables and special characters.



