Markdown in Google Docs (2026): Open .md Files, Export, and Copy as Markdown
Google Docs can now open and edit .md files without converting them. How that differs from the older Markdown setting, how to export a Doc as Markdown, what formatting gets lost, and which method to use for which job.
Google Docs now has three separate Markdown features, added at different times, and they behave differently. That is why advice online often contradicts itself: one person says Docs converts your .md file, another says it keeps it as Markdown, and both are right depending on which feature they used.
This guide sorts them out, using Google's own help pages as the source. Short version:
| You want to | Use | Result |
|---|---|---|
Edit a .md file with a team and keep it as .md |
Open the file from Drive (Markdown Mode) | Stays a .md file in Drive, with comments and version history |
| Turn a Google Doc into Markdown | File > Download > Markdown (.md) | A new .md file on your computer |
| Paste a chunk of Markdown (for example from ChatGPT or Claude) into a Doc | Right-click > Paste from Markdown | Formatted Docs text |
| Copy part of a Doc as Markdown | Right-click > Copy as Markdown | Markdown on your clipboard |
Type **bold** or # Heading and have it format as you go |
Tools > Preferences > Enable Markdown | Autoformatting while you type |
1. Markdown Mode: open .md files without converting them
This is the new one. On October 5, 2026, Google announced that Docs can "view, edit, and collaborate on Markdown (.md or .markdown) files directly in Google Docs" without changing the file type. Google says it is available to all Google Workspace customers and to personal Google accounts, with no admin or user setting, rolling out over up to 15 days from that date.
How it works, per the Google Docs help article:
- Upload the
.mdfile to Google Drive. - Double-click it. It opens in Docs in Markdown Mode, with an
.mdtag next to the title. - Edit, comment, tag people and share it like any other Doc. Version history works too.
The file is not converted. It stays a .md file in Drive, which matters if the file also lives in a Git repository, a static site or a notes app such as Obsidian. Before this change, opening Markdown in Docs meant importing it, and Google's own announcement admits that the old route "often altered formatting, stripped comments, and fragmented files."
Drive also gained a rendered preview. Right-click the file, choose Open with > Preview, and switch between Markdown and Preview at the top. That is the quickest way to read a README someone shared with you. If the file is not in Drive, the free Markdown viewer does the same thing in a browser tab without uploading the file anywhere.
What gets lost when you edit an .md file in Docs
Markdown cannot store everything a Doc can, so Google lists what changes when you edit in Markdown Mode:
- Smart chips become plain text or links
- HTML formatting becomes plain text
- Font colors, highlights and text alignment are removed
If an edit strips something you needed, File > Version history brings the old version back. If you want the file to become a real Google Doc with all Docs formatting, use File > Save as Google Docs (on a computer). That creates a Doc and leaves Markdown behind, so only do it when you no longer need the .md file.
The HTML point is worth knowing if your Markdown uses inline HTML for things like <details> blocks, <br> inside table cells or colored text. Those are common in GitHub READMEs (see collapsible sections and text color in Markdown) and will not survive a round trip through Docs as HTML.
2. Export a Google Doc as Markdown
This has existed since 2024. In any Google Doc:
File > Download > Markdown (.md)
You get a .md file on your computer. This is the right choice when the Doc is the source and Markdown is the output: publishing a Doc to a docs site, handing a spec to a developer, or feeding a document to an AI tool that prefers Markdown.
Before you publish the result, open it in the Markdown editor or run it through the Markdown linter. Exports from any word processor tend to need small fixes, such as heading levels that skip, or tables that need tidying with the table formatter.
If you have a .docx file instead of a Google Doc, Word to Markdown converts it in the browser. For the other direction, Markdown to Word produces a .docx you can upload to Drive.
3. Copy as Markdown and Paste from Markdown
These two right-click options are the most useful day to day, and they are off by default. Turn them on under Tools > Preferences > Enable Markdown. (Help article)
- Paste from Markdown: copy Markdown text, right-click in a Doc, choose Paste from Markdown. It arrives formatted. This is the clean way to move an answer from ChatGPT, Claude or Gemini into a Doc without stray asterisks and pound signs.
- Copy as Markdown: select part of a Doc, right-click, choose Copy as Markdown, and paste it into GitHub, Slack, Notion or a
.mdfile.
A common mistake is pasting AI output with a normal paste and then deleting asterisks by hand. If the destination is not a Doc, for example a form field or an email, our Markdown to plain text tool strips the syntax instead (more on that in how to remove Markdown formatting from ChatGPT and Claude output).
4. Markdown autoformatting while you type
The same Enable Markdown setting also makes Docs format Markdown as you type. Google's help article lists:
| Type | You get |
|---|---|
# Heading to ###### Heading |
Heading 1 to Heading 6 (a space after the # is required; Docs only, not Slides or Drawings) |
*italic* or _italic_ |
Italic |
**bold** or __bold__ |
Bold |
***bold italic*** |
Bold and italic |
~strikethrough~ |
Strikethrough (a single tilde, unlike GitHub's ~~) |
[text](https://example.com) |
Link (no space between ] and () |
Two details trip people up. First, strikethrough uses a single tilde here, while GitHub and most Markdown renderers use two (see Markdown strikethrough on every platform). Second, the help article does not list code formatting, so do not expect backticks to turn into code while you type.
Which one should you use?
- The file belongs somewhere else (a repo, a docs site, a notes vault): open it in Markdown Mode so it stays
.md. Collaborators get comments and history, and the file never stops being Markdown. - The Doc is the master copy: keep writing in Docs and use File > Download > Markdown when you need a Markdown version.
- You are moving snippets: Copy as Markdown and Paste from Markdown, after turning on the setting.
- You want colors, highlights, alignment or smart chips: keep it a Google Doc. Markdown Mode will remove them.
Getting Google Keep notes into Markdown
Google Keep has no Markdown export of its own, but the Keep product page says you can export notes to Google Docs. From there, File > Download > Markdown (.md) gives you a Markdown file, which is the simplest way to move a handful of Keep notes into a Markdown notes app. For a full account export, Google Takeout includes your Keep notes, attachments, labels and collaborators. See Google Keep vs Evernote and other Google Keep alternatives if you are moving for good.
On a Mac, Apple Notes now has a similar trio: File > Export To > Markdown, Edit > Copy as Markdown, and File > Import Markdown, according to Apple's Notes user guide. If you are choosing a notes app based on how it stores files, the best Markdown note taking apps list only includes apps that keep notes as Markdown files on disk, not apps that only import or export it.
Summary
Google Docs went from "import and hope" to treating Markdown as a real file type. Use Markdown Mode for .md files you share, File > Download for one-off exports, and turn on Enable Markdown for the copy, paste and typing shortcuts. Expect colors, highlights, alignment, smart chips and inline HTML to disappear whenever a document passes through Markdown, and use version history if something important goes missing.