How to Convert a Google Doc to Markdown (Cleanly)
You have a Google Doc and you need it as Markdown, for a GitHub README, a static site, or an LLM prompt. There are four common ways to do it, and they differ mostly in one place: what happens to tables and to the stray formatting Google Docs leaves behind. Here is each method, what it keeps, what it breaks, and how to pick.
The four ways to convert
- Built-in export. File, then Download, then Markdown (.md). Native, no install, and it covers most prose.
- The Docs to Markdown add-on. A long-standing community add-on that converts a Doc to Markdown and copies it to your clipboard.
- Pandoc. A command-line converter. Highest structural fidelity, but it is a local tool you install and run.
- A browser tool. Select all in the Doc, copy, and paste into Google Doc to Markdown. Nothing installs and nothing uploads.
Built-in export
Since Google added Markdown export in 2024, this is the fastest path. Open the Doc, choose File, then Download, then Markdown (.md), and you get a .md file.
It handles headings, bold, italic, lists, and links well. The weak spot is tables: depending on the content they can lose their column structure, so check any table-heavy document after export rather than assuming it survived. Comments and suggestions are not carried over, which is usually what you want in an export anyway.
The Docs to Markdown add-on
The add-on is the most-referenced option for this direction, and it works, with one caveat worth knowing before you rely on it: it outputs tables as HTML rather than as Markdown pipe tables. If your target renders HTML inside Markdown that is fine; if you need portable pipe-table syntax, you will be reformatting by hand. It also gives you little control over the output style.
Pandoc
If you already live in a terminal, Pandoc gives the cleanest structural result. The usual route is to download the Doc as .docx first, then convert:
pandoc input.docx -t gfm -o output.md
gfm targets GitHub-Flavored Markdown, so tables and task lists come through in portable syntax. The cost is the setup: you install Pandoc, export the .docx, and run the command, which is worth it for batch or scripted jobs and overkill for a single document.
A browser tool
For a one-off with no install, select everything in the Doc, copy, and paste into Google Doc to Markdown. It straightens smart quotes, strips the invisible spacing Google Docs adds, and hands back clean Markdown. Everything runs in your browser, so the document text is never uploaded. If you also need the other direction, paste to Markdown cleans formatted text copied from any source.
The methods, compared
| Method | Handles well | Breaks or costs | Best for |
|---|---|---|---|
| Built-in export | Headings, lists, links, prose | Tables can lose structure; no comments | A quick, native export |
| Docs to Markdown add-on | Headings, lists, links | Tables become HTML; little style control | Clipboard-first workflows |
| Pandoc | Tables, task lists, high fidelity | Install, .docx step, command line | Batch or scripted conversion |
| Browser tool | Clean inline output, smart-quote fixes | Paste-based, one document at a time | A no-install one-off |
When the export keeps coming back
Every method above produces a static copy. That is exactly right for a one-time conversion. It becomes a chore when the Doc keeps changing and you keep re-exporting: a teammate edits the Doc, and your Markdown file is stale again the next morning.
If your Markdown is the source of truth and the Google Doc is where people read and comment, converting on a loop is the wrong tool. Two-way sync keeps a local Markdown file and a real Google Doc in agreement in both directions, which is what md2gd is built for. For the mechanics of what converts and what does not in the other direction, see Google Docs Markdown: what works, what breaks.
FAQ
How do I convert a Google Doc to Markdown? Use File, then Download, then Markdown (.md) for a native export, or select all, copy, and paste into a browser tool like Google Doc to Markdown for a clean, no-install result.
Does Google Docs export tables to Markdown?
The built-in export can lose table structure on complex tables, and the Docs to Markdown add-on outputs tables as HTML. For portable pipe-table syntax, Pandoc targeting gfm is the most reliable.
What is the cleanest way to convert without installing anything? Copy the Doc contents and paste into Google Doc to Markdown. It runs in the browser, straightens smart quotes, and removes the hidden spacing Google Docs inserts.
How do I keep the Doc and the Markdown in sync instead of re-exporting? Exporting always creates a static copy that goes stale. md2gd keeps a Markdown file and a Google Doc synced both ways so you stop re-converting.
Which should you use?
For a single document, the built-in export or a browser tool gets you clean Markdown in seconds, with tables as the thing to double-check. For batch or scripted jobs, Pandoc is worth the setup. And if you find yourself converting the same Doc again and again, the fix is not a better converter but keeping the two in sync. Start with the free tools and reach for sync when the re-export loop becomes the bottleneck.