Word or Google Docs to Markdown

Checked November 2026 against Google's Docs help, the Google Workspace blog, the pandoc manual and Microsoft's Copilot update. 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 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 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 and use pandoc, as below.

Markdown files themselves have also changed in Google Drive. Since October 2026, an uploaded .md file opens in Docs in a Markdown mode 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 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:

  • -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 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 situationUse
A Google Doc, simple contentFile > Download > Markdown (.md)
A Word file you need whole, with imagesPandoc
Many Word filesPandoc in a small shell loop
A few paragraphs from eitherCopy 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, so a merged cell or a list in a cell needs rethinking. See Markdown tables without the pain.
  • 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.
  • Footnotes. Check that they survived, and that your editor draws them.
  • 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.
  • 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.