How to Convert Markdown to Google Docs
Google Docs now imports and exports markdown natively. How to convert markdown to Google Docs, export back out, enable paste from markdown, and what gets lost in the round trip.
Short answer: Google Docs converts markdown natively — you no longer need a third-party tool. To convert markdown to Google Docs, upload the .md file to Drive and choose "Open with Google Docs," or use File > Open inside Docs. To go the other way, use File > Download > Markdown (.md). For pasting, turn on Tools > Preferences > Enable Markdown, which unlocks "Paste from Markdown" and "Copy as Markdown" in the Edit menu.
For years the answer to this question was a mess of add-ons, browser extensions, and copy-paste-through-HTML tricks. Google shipped proper markdown import and export in July 2024, and it works well enough that most of those workarounds are now obsolete. What it doesn't handle is worth knowing before you rely on it.
Importing: Markdown to Google Docs
There are two paths, and both produce the same result.
From Google Drive: upload the .md file to Drive, right-click it, and choose Open with > Google Docs. Drive converts the markdown into a native Google Doc and leaves the original .md file untouched alongside it.
From inside Docs: open any document, then File > Open, switch to the Upload tab, and drop your .md file in.
Either way, headings become real Google Docs heading styles (which means the document outline sidebar populates correctly), lists become lists, tables become tables, links become links, and inline code picks up a monospace style.
Import is on by default. There's no setting to enable and no admin control to request.
Exporting: Google Docs to Markdown
File > Download > Markdown (.md).
That's it. Docs walks the document and produces markdown: # for Heading 1, ## for Heading 2, **bold**, *italic*, - for bullets, pipe tables for tables, and standard link syntax.
This is genuinely useful for a workflow a lot of teams have wanted: draft collaboratively in Docs where the comments and suggestions live, then export to markdown when the content needs to go into a docs site, a repo, or a static site generator.
The export is also on by default.
Pasting: Enable Markdown First
The paste behavior is the part that's off by default, and it's the part most people actually want day to day.
Go to Tools > Preferences and check Enable Markdown. This turns on three things:
- Markdown autoformatting while you type. Typing
##at the start of a line converts it to Heading 2.**text**becomes bold as you close the asterisks.-starts a bulleted list. This part has existed since 2022. - Paste from Markdown. Copy raw markdown from anywhere — a terminal, a code editor, a Claude or ChatGPT response — and use Edit > Paste from Markdown. Docs parses the syntax and inserts formatted content instead of literal asterisks.
- Copy as Markdown. Select formatted content in Docs and use Edit > Copy as Markdown to put markdown source on your clipboard.
The setting is per-user, not per-document, and it sticks across documents.
One thing to watch: with Enable Markdown on, a plain ⌘V of markdown text may convert automatically depending on the source formatting. If you specifically want the literal characters — say you're documenting markdown syntax inside a Doc — paste without formatting (⌘⇧V) or wrap the text in a code block first.
What Breaks
Google Docs has no concept of most markdown extensions. Here's what does not survive import:
| Feature | Result in Google Docs |
|---|---|
| Mermaid diagrams | Plain text — the fence content appears as literal code |
LaTeX math ($...$, $$...$$) | Plain text, dollar signs and all |
| Footnotes | Not converted to Docs footnotes; syntax may appear inline |
| Code block syntax highlighting | Monospace text, no colors, language tag dropped |
Task list checkboxes (- [ ]) | Converted to Docs checklist items or literal brackets, depending on the source |
| YAML frontmatter | Rendered as literal text at the top of the document |
| Inline HTML | Stripped or shown as text |
If your document depends on Mermaid diagrams or LaTeX math, Docs is the wrong destination. Render those to images first and insert the images, or pick a different target format.
Frontmatter is the one that catches people most often. Strip the --- block before importing, or you'll get a wall of title: and tags: lines at the top of the document.
Round-Tripping Loses Formatting
Markdown in, markdown out, and back again is not lossless. Each pass through Google Docs normalizes the document to what Docs can represent:
- Reference-style links (
[text][ref]) come back as inline links. - Setext headings (
Titleunderlined with===) come back as ATX headings (# Title). - Your list marker style is normalized —
*bullets typically come back as-. - Emphasis markers get normalized to Docs' preferred characters.
- Hard line breaks inside paragraphs may be dropped or converted.
- Table column padding and alignment colons are rewritten.
None of these change the rendered meaning. All of them produce noisy git diffs. If your markdown lives in version control, a Docs round trip will show up as a huge diff that's almost entirely reformatting.
The practical rule: pick one format as the source of truth. Either the Doc is canonical and markdown is an export, or the markdown is canonical and the Doc is a review copy. Editing both and syncing back and forth is how you lose changes.
Alternative: Convert via DOCX with Pandoc
Native import handles the common cases. When it doesn't — you need footnotes preserved, or you're converting a batch of files, or you want to apply a specific template — route through DOCX instead.
pandoc input.md -o output.docx
Then upload output.docx to Drive and open it with Google Docs. Drive's Word import is mature and handles footnotes, equations, and complex tables better than the markdown importer does.
This also gives you scripting. Converting fifty files:
for f in *.md; do pandoc "$f" -o "${f%.md}.docx"; done
Then upload the folder to Drive and batch-convert. The full set of Pandoc options for this route is covered in Markdown to Word and back.
Going the other direction, download the Doc as .docx and convert:
pandoc downloaded.docx -t gfm --wrap=none --extract-media=./media -o output.md
The --extract-media flag matters here. Google Docs embeds images in the exported .docx, and without that flag Pandoc drops them. It also matters because Docs' own markdown export doesn't give you image files at all — inserted images typically end up as links to Google-hosted URLs rather than local files, which is fine until the sharing permissions change.
Third-Party Add-Ons
The Google Workspace Marketplace has a category of markdown add-ons — sidebar editors, preview panes, converters. They exist and some are actively maintained, but the native features cover the same ground now, and an add-on gets access to your document contents.
Before installing one, ask whether it's doing something the built-in import, export, and paste options can't. Since July 2024 the honest answer is usually no. If you do install one, check what permissions it requests and whether it's still being updated.
Which Method to Use
| You want to | Use |
|---|---|
Turn a .md file into a Doc | Drive > Open with Google Docs |
Turn a Doc into a .md file | File > Download > Markdown (.md) |
| Paste AI output or terminal text as formatted content | Enable Markdown, then Edit > Paste from Markdown |
| Get markdown out of a Doc without downloading | Edit > Copy as Markdown |
| Convert many files, or preserve footnotes and equations | Pandoc via DOCX |
| Convert something confidential | Pandoc, locally |
After the Conversion
Whichever route you take, read the resulting markdown before you commit it or publish it. Conversions fail quietly — a table loses a column, a nested list flattens, a heading level shifts by one — and none of that is visible in the raw source at a glance.
OpenMark opens the converted .md file and renders it immediately, so you see the actual structure: which headings landed where, whether the tables are intact, whether a stray frontmatter block is sitting at the top of your document. Switching to Markdown view shows the raw source so you can fix what's wrong.
The broader tradeoff between plain text and a collaborative rich text editor is worth thinking about too — markdown vs rich text covers when each one earns its place.
Download OpenMark → — $9.99, one-time, native macOS. Check your Google Docs exports render correctly before they go anywhere, with full support for tables, code blocks, and footnotes.