How to Convert Word to Markdown (DOCX to MD)
The fastest free way to convert a Word document to Markdown is the FileNaut Word to Markdown converter. Drop in a .docx file and the Markdown appears straight away: headings, bold and italic, nested lists, tables, links, footnotes and images all come across. The conversion runs inside your browser, so the document is never uploaded anywhere.
Below are three free methods, a side-by-side test of what each one keeps and loses, and fixes for the problems people hit most often: headings that come out as plain text, tables that turn into HTML, and pictures that go missing.
Method 1: Convert Word to Markdown in your browser (free, no upload)
Best for: one document at a time, confidential files, and anyone who does not want to install anything.
- Open the Word to Markdown converter.
- Drag your
.docxfile onto the page, or click Browse Files. It converts as soon as the file loads. - Check the result in the Markdown tab, or switch to Preview to see it rendered. You can edit the text right there before you save.
- Click Copy, or Download .md to save a Markdown file named after your document.
- If the document has pictures, click Download .zip instead. The zip holds the
.mdfile plus animagesfolder, and the Markdown already links toimages/image-1.pngand so on, so the pictures show up as soon as you unzip it.
A summary line tells you what was found (for example "3 headings · 1 table · 1 image · 2 footnotes"), which is a quick way to spot a document whose headings were never real headings. More on that below.
What survives the conversion (tested)
We built test documents three ways (with Python's python-docx, with Pandoc, and with LibreOffice), then converted each one with FileNaut and with Pandoc 3.9 using -t gfm. This is what came out.
| In the Word file | FileNaut | Pandoc 3.9 (gfm) |
|---|---|---|
| Heading 1 to Heading 6 styles | # to ###### headings | # to ###### headings |
| A first line in the Title style | Kept as a # heading | Left out of the Markdown (kept only as front matter if you add -s) |
| Bold, italic, strikethrough | Kept | Kept |
| Underline | Dropped (Markdown has no underline) | Kept as HTML <u> |
| Bulleted and numbered lists, nested | Kept | Kept |
| Simple table | Markdown pipe table | Markdown pipe table |
| Table column alignment | Lost (all columns left) | Kept |
| Table with merged cells or two paragraphs in a cell | Still a pipe table: merged cells left blank, paragraphs joined with <br> | The whole table becomes an HTML <table> block |
| Links to websites | Kept | Kept |
| Table-of-contents and cross-reference links | Plain text | Kept as links to #_Toc… anchors that do not exist in the Markdown |
| Footnotes | [^1] footnotes | [^1] footnotes |
| Pictures | Markdown image links, files in the .zip | HTML <img> or <figure> tags with sizes, files in a media folder |
| Code typed in Consolas or Courier New | Inline code, or a fenced code block for whole lines | Plain text |
| Tracked changes | Insertions kept, deletions dropped | The same by default |
| Long paragraphs | One line per paragraph | Wrapped at about 72 characters unless you add --wrap=none |
Neither tool keeps fonts, colours or page layout. Markdown has no way to describe them.
Method 2: Convert Word to Markdown with Pandoc
Best for: batches of files, scripts, and anyone who wants table alignment or underline kept. Pandoc is a free command-line converter for Windows, Mac and Linux.
- Install Pandoc from its website, or with a package manager.
- Open a terminal in the folder that holds your document.
- Run this command, changing
reportto your file's name:pandoc report.docx -t gfm --wrap=none --extract-media=. -o report.md
What each part does:
-t gfmwrites GitHub-flavored Markdown, which is what GitHub, GitLab, Obsidian and most static site generators expect.--wrap=nonekeeps each paragraph on one line. Without it, Pandoc breaks lines at about 72 characters, which makes later edits and diffs messy.--extract-media=.saves the pictures into amediafolder next to the Markdown file. In our test,--extract-media=mediacreatedmedia/media/instead, one folder deeper than most people expect.- Add
-sif your document starts with a line in Word's Title style. Without it, Pandoc leaves the title out. With it, the title becomes front matter at the top of the file. - Add
--track-changes=allto see insertions and deletions marked up in the output, or--track-changes=rejectto get the document as it was before the edits.
To convert every document in a folder on Mac or Linux:
for f in *.docx; do pandoc "$f" -t gfm --wrap=none --extract-media=. -o "${f%.docx}.md"; doneMethod 3: Convert Word to Markdown with Google Docs
Best for: people who already work in Google Drive.
- Upload the
.docxto Google Drive and open it with Google Docs. - Choose File → Download → Markdown (.md).
- Open the downloaded file and check the tables and pictures.
Google has added Markdown support to Docs in stages, so the menu may look different in your account. If the Markdown option is missing, use Method 1 instead.
Why your headings come out as plain text
This is the most common complaint, and the cause is in the Word file rather than the converter. Markdown headings come from Word's heading styles. A line that was made to look like a heading by making it big and bold is, as far as Word is concerned, an ordinary paragraph, so every converter turns it into an ordinary paragraph.
To fix it in Word:
- Click in a line that should be a main heading.
- On the Home tab, click Heading 1 in the Styles gallery. Use Heading 2 for sub-headings, and so on.
- If the document has many fake headings formatted the same way, select one, then use Select → Select All Text With Similar Formatting on the Home tab and apply the style to all of them at once.
- Save and convert again. The FileNaut summary line should now show the right number of headings.
The same goes for lists. Bullets typed by hand as a dash or an asterisk followed by a space are plain text to Word. Use the Bullets or Numbering button, so the converter sees a real list.
Why the Markdown has backslashes in it
Some characters mean something in Markdown. If your Word text contains them, the converter puts a backslash in front so they show up as typed instead of being treated as formatting. In our test document, 5 * 3 came out as 5 \* 3, a line starting with #hashtag as \#hashtag, and a paragraph starting with 1. as 1\. , so it does not turn into a numbered list. Pandoc did exactly the same.
The backslashes do not appear when the Markdown is displayed. Switch to the Preview tab to check. Only remove one if you actually want that character to act as formatting.
Tips for a clean Markdown file
- Fix the Word file first, not the Markdown. Applying heading and list styles in Word takes a minute and fixes every later conversion. Fixing the same thing by hand in the Markdown has to be done again each time.
- Accept or reject tracked changes before converting. Both FileNaut and Pandoc (by default) keep insertions and drop deletions, which is the same as accepting everything. If that is not what you want, settle the changes in Word first: Review → Accept or Reject.
- Use a code font for code. If you paste commands or code into Word, set them in Consolas or Courier New. FileNaut turns that into inline code or a fenced code block, which keeps the code readable after conversion.
- Keep the pictures with the file. Use the .zip download, and keep the
imagesfolder next to the.mdfile when you move it into a repository or a notes app. - Old .doc files have to be resaved. Neither the browser converter nor Pandoc reads the pre-2007
.docformat. Open the file in Word, Google Docs or LibreOffice and save it as.docxfirst. - Polish the result. Paste the Markdown into the Markdown Editor to tidy it with a live preview, or rebuild an awkward table with the Markdown Table Generator.
- Starting from a PDF? Use PDF to Markdown. If you can get the original Word file, convert that instead. A
.docxstill knows which lines are headings, lists and tables, and a PDF does not.
Frequently asked questions
How do I convert a Word document to Markdown for free?▼
Can Microsoft Word save as Markdown?▼
Does converting Word to Markdown keep images?▼
--extract-media=. so the pictures are saved next to the file.What happens to tables with merged cells?▼
Why are my Word headings not headings in Markdown?▼
Can I convert an old .doc file to Markdown?▼
Is it safe to convert a confidential document online?▼
How do I convert Markdown back to Word?▼
Ready to try it?
Use the tool right now — free, no signup, no upload.