View and edit Markdown (.md) files in Google Docs

Markdown (.md or .markdown) files are a standard text format widely used by large language models (LLMs) to preserve structured data.

In Google Drive and Google Docs, you can:

  • Access fully ready, formatted Markdown files – with links that you can click and neat tables – right in Drive.
  • Open and change .md files in Google Docs without changing the file type. They stay as .md files.
  • Work with others straight away using comments, sharing and working on the same file.

Preview an .md file in Drive

  1. Open Google Drive and right-click your file.
  2. Select Open with and then Preview .
  3. At the top of the viewer, you can switch between Markdown and Preview.
  4. To edit the file, open it in Google Docs.

Open an .md file in Docs

Important: Your file does not convert to a Google Docs file. It stays as an .md file, kept in Drive. Google Docs is an editor where you can see the final format and work with others.

  1. Upload your .md file to Google Drive
  2. Click the .md file twice to open it in Google Docs.
    • It opens in Markdown mode, and you'll find an .md tag next to the title .

Share and collaborate on Markdown files

You can share .md files from Google Docs with your collaborators. You can keep your comments and formatting when you reopen your document in Google Docs or in other tools.

Google Docs formatting not supported in Markdown files

Some Google Docs features might change when you edit an .MD file. To restore the original, click File, then Version history.

  • Smart chips change to text or links
  • Web formatting (.HTML) turns into plain text
  • Font colours, highlights and text alignment are removed.

Related resources

true
Visit the Learning Centre

Using Google products, like Google Docs, at work or school? Try powerful tips, tutorials and templates. Learn to work on Office files without installing Office, create dynamic project plans and team calendars, auto-organise your inbox and more.

Search
Clear search
Close search
Main menu
9199355584923453611
true
Search Help Centre
false
true
true
true
true
true
35
false
false
false
false
false