---
title: "Word or Google Docs to Markdown"
author: Pedro Thomaz
source: https://coffeetext.app/blog/word-google-docs-to-markdown
---

# Word or Google Docs to Markdown

> Checked November 2026 against [Google's Docs help](https://support.google.com/docs/answer/12014036?hl=en), the [Google Workspace blog](https://workspaceupdates.googleblog.com/2026/10/preview-edit-and-collaborate-on-Markdown-files-natively-across-Drive-and-Docs.html), the [pandoc manual](https://pandoc.org/MANUAL.html) and [Microsoft's Copilot update](https://techcommunity.microsoft.com/blog/microsoft-copilot-blog/what%E2%80%99s-new-in-microsoft-copilot--october-2026/4568528). Coffee isn't affiliated with any of them.

Google Docs can do it directly: choose File > Download > Markdown (.md). For a Word file, the dependable free route is pandoc, with `pandoc report.docx -t gfm --wrap=none --extract-media=attachments -o report.md`, which also pulls the images out. For a few paragraphs from either, copying and pasting into an editor that converts formatted text is often enough.

## From Google Docs

[Google's help](https://support.google.com/docs/answer/12014036?hl=en) gives two ways.

**Download the whole document.** Open it and go to File > Download > Markdown (.md). You get a `.md` file you can use anywhere. Google's [announcement](https://workspaceupdates.googleblog.com/2024/07/import-and-export-markdown-in-google-docs.html) says this is available for Workspace customers and personal accounts alike.

**Copy part of it.** Turn on Tools > Preferences > Enable Markdown, select some text, right-click and choose Copy as Markdown. It's off until you enable it. The same setting gives you Paste from Markdown, for going the other way.

Google's pages don't say how images and footnotes are handled in the export, so look at the result if your document has them. If the export doesn't do what you need, [download it as .docx](https://support.google.com/docs/answer/6055139?hl=en) and use pandoc, as below.

Markdown files themselves have also changed in Google Drive. Since [October 2026](https://workspaceupdates.googleblog.com/2026/10/preview-edit-and-collaborate-on-Markdown-files-natively-across-Drive-and-Docs.html), an uploaded `.md` file [opens in Docs in a Markdown mode](https://support.google.com/docs/answer/18289341?hl=en-IE) and stays an `.md` file. That's useful if you're working with someone in Docs, though that page warns that smart chips become text or links, and that font colours, highlights and text alignment are removed.

## From Word, with pandoc

[Pandoc](https://pandoc.org/installing.html) is free and reads `.docx`. Install it with `brew install pandoc`, or from the installer on its site, then run this in the folder holding your file:

```
pandoc report.docx -t gfm --wrap=none --extract-media=attachments -o report.md
```

Each part does a job, according to [the manual](https://pandoc.org/MANUAL.html):

- **`-t gfm`** writes GitHub Flavored Markdown, so tables come out as tables where they can.
- **`--wrap=none`** stops pandoc wrapping lines at its default of 72 columns, leaving one line per paragraph. Do use this one: wrapped lines cause trouble in some editors.
- **`--extract-media=attachments`** saves the document's images into that folder and adjusts the links to point there.

Tracked changes need a moment's thought. By default pandoc accepts them all, and it ignores comments. If the document is still under review, resolve it first or look at the `--track-changes` option, which can reject changes or include them marked up.

An older `.doc` file isn't what this command expects. macOS's own `textutil` can write `.docx`, so `textutil -convert docx old.doc` gets you there first. Check the result in Word or Pages before you go on, as a conversion like that can change the layout.

## Word's own Markdown support

Microsoft has been adding this. Its [October 2026 Copilot update](https://techcommunity.microsoft.com/blog/microsoft-copilot-blog/what%E2%80%99s-new-in-microsoft-copilot--october-2026/4568528) says Word now has Markdown shortcuts while writing, keeps formatting when copying and pasting between Word and Markdown, and can convert between `.md` and `.docx` on the web. The post doesn't give steps, or say which plans and versions get it, so look in your own copy of Word. If it's there, it's the simplest route for one file.

## By pasting

When you copy formatted text, the clipboard usually holds an HTML version as well as plain text. An editor that understands this can convert it as you paste. That's quick for a few sections, and it doesn't need Terminal.

It only knows what's on the clipboard, though, and that depends on the app you copied from. Headings styled by hand with a large font aren't headings to anything that reads them. Images often don't come across.

## Which to use

| Your situation | Use |
|---|---|
| A Google Doc, simple content | File > Download > Markdown (.md) |
| A Word file you need whole, with images | Pandoc |
| Many Word files | Pandoc in a small shell loop |
| A few paragraphs from either | Copy and paste |

## What to check afterwards

No conversion is perfect, as Word and Docs can hold things Markdown can't. Go through these in the result:

- **Headings.** Real heading styles convert. Text that's just bold and large won't, so fix those by hand with `## `.
- **Tables.** GFM cells [can't hold block elements](https://github.github.com/gfm/), so a merged cell or a list in a cell needs rethinking. See [Markdown tables without the pain](https://coffeetext.app/blog/markdown-tables-guide).
- **Images.** Check each one shows, and look at how it was written. A `![]()` line is Markdown, but if the converter wrote an HTML `<img>` tag, some editors will show the tag as text. Add a description too, as a converted image often has none. See [adding images to Markdown](https://coffeetext.app/blog/images-in-markdown-mac).
- **Footnotes.** Check that they survived, and that [your editor draws them](https://coffeetext.app/blog/extended-markdown-footnotes-task-lists).
- **Colours, fonts, page layout, headers and footers.** Don't expect these to come across. Markdown has no way to hold them.
- **Comments and tracked changes.** Confirm they went the way you meant.

## In Coffee

Open or drop a `.docx` on Coffee and it makes a new note from it. Headings, nested lists, numbered lists that keep their numbers, bold, italic, strikethrough, highlights, links, tables and pictures all come across, and the pictures go to `attachments`. It also takes `.doc`, `.rtf` and `.odt`. Your original isn't changed.

Some things don't come across: comments and page layout stay behind, tracked changes come in as accepted, and a table inside a table joins its cell. A password-protected document has to be unlocked first. Word's own format holds more than Markdown can, so it's worth reading the result through.

For part of a document, copy it and press ⌘V in Coffee's page view. Coffee looks for the formatted copy on the clipboard and turns headings, bold, italic, strikethrough, inline code, lists including nested ones, quotes, code blocks, tables and links into Markdown. It knows about Google Docs' habit of wrapping everything in a bold tag that isn't really bold. A few limits apply:

- **Images are dropped.** Save them separately, then paste or drag them in, and [they go to `attachments`](https://coffeetext.app/blog/images-in-markdown-mac).
- **Only web and email links are kept.** A link to anything else becomes plain text.
- **The first row of a table becomes the header**, and merged cells aren't rebuilt.
- **It works only in the page view.** The Markdown view and code blocks paste exactly what you copied, as plain text.
- **It depends on the clipboard**, so results differ from one app to the next. Read the result through.

If you'd rather use pandoc's command above, pointing `--extract-media` at `attachments` keeps the images where Coffee keeps its own, in a subfolder, as long as the `.md` file stays beside that folder. Then Check Document, in the Note menu, will tell you about any image it can't find.

## Questions

### Can Google Docs export Markdown?

Yes. Google's help describes File > Download > Markdown (.md), and Copy as Markdown for a selection once Enable Markdown is on under Tools > Preferences.

### Can Word save as Markdown?

Microsoft's October 2026 update says Word can convert between `.md` and `.docx` on the web, without steps or plan details. Pandoc is a well-documented free alternative.

### Does pandoc keep images from a Word file?

Yes, with `--extract-media`. It saves them to the folder you name and adjusts the links in the Markdown to point there.

### Can Coffee open a Word document?

It imports one. Open or drop a `.docx`, `.doc`, `.rtf` or `.odt` file and Coffee makes a new Markdown note from it, leaving the original as it was. It doesn't edit the Word file itself.

---

Written by Pedro Thomaz, who makes Coffee, a Markdown editor for the Mac on macOS 15 or later. It's free for 14 days with no card or account, then €3 a month, €29 a year, or €79 once with two years of updates. More at https://coffeetext.app/llms-full.txt
