Markdown in Google Docs

Converts Markdown as you type once you turn it on in the settings. On top of that come pasting, copying, import and export as Markdown.

What to watch out for

  • Turn it on first: Under Tools > Preferences, check “Enable Markdown”. Only then does Docs convert headings, bold, italic, strikethrough and links as you type. Docs recognizes lists through a separate setting that is on from the start.
  • Pasting: To paste Markdown from the clipboard, right-click and choose “Paste from Markdown”. Docs converts it into formatted text.
  • Copying and export: Right-click and choose “Copy as Markdown” to take selected text along as Markdown. To download the whole document, use File > Download > Markdown (.md).
  • Import: Open a Markdown file with File > Open > Upload. Docs then opens it as a document.

What's different or missing in Google Docs

Strikethrough

Standard
~~or~
Google Docs
~

Two tildes before and after the text strike it through. On a US keyboard, you type the tilde with ⇧ Shift and the key left of 1. On a UK keyboard in Windows, press ⇧ Shift + #, the key next to ↵ Enter.

More on this

Strikethrough is part of the GitHub Flavored Markdown (GFM) extension and is missing from the original Markdown. GFM also accepts a single tilde (~). In some programs, such as Pandoc, it sets the text as subscript instead, so two tildes are safer. In HTML, this becomes <del>.

Markdown (Google Docs) (click to edit)

The meeting is on ~Tuesday~ Wednesday.

Result

The meeting is on Tuesday Wednesday.

Different

One tilde (~) instead of two.

Task list

Standard
- [ ]

Square brackets after the hyphen make a checkbox. An x inside checks it off.

More on this

Task lists are part of GitHub Flavored Markdown (GFM). Between the empty brackets, there is exactly one space.

Not available

Add checklists with Ctrl + ⇧ Shift + 9 (Mac: ⌘ Cmd + ⇧ Shift + 9) or from the toolbar.

Image

Standard
![]()

You write an image like a link with an exclamation mark in front. The square brackets hold the description of the image, and the parentheses hold the URL of the image. If the image is on another website, the URL starts with https://.

More on this

The description becomes the alt attribute of the <img>. Screen readers read the description aloud, and it appears when the image doesn't load.

Not available

Quote

Standard
>

A greater-than sign at the start of a line indents the paragraph as a quote.

More on this

In HTML, this becomes <blockquote>. You can nest quotes with >>, and they can contain lists or headings. Leave a blank line before and after the quote: without a blank line after it, the next line also counts as part of the quote.

Not available

Code

Standard
`

Backticks show text unchanged in a font with fixed width. One backtick on each side wraps code in the middle of a sentence. Three backticks on lines of their own wrap a whole block.

More on this

After the three opening backticks (```), you can add the name of a language (js, python). Many apps then color the code. On US and UK keyboards, the backtick is on the key left of 1, without ⇧ Shift. If the code itself contains a backtick, wrap it in two backticks: ``Text with ` inside``. Outside of lists, indenting a line by four spaces after a blank line also makes a code block. So don't indent normal text.

Not available

There is no mark for code as you type. Add code blocks with Insert > Building blocks or @.

Table

Standard
|

Vertical bars separate the columns. The second row, made of hyphens, turns the first row into the header row. Without this header row, there is no table.

More on this

Tables are part of GitHub Flavored Markdown (GFM). The bars don't have to line up in the source text. Colons in the separator row align a column: :--- left, :---: center, ---: right. To show a vertical bar as a character in a cell, write it with a backslash: \|.

Not available

Horizontal rule

Standard
---or***or___

Three hyphens on a line of their own make a horizontal rule. Leave a blank line before it.

More on this

If the three hyphens sit directly under a line of text, Markdown turns that line into a second-level heading. With *** or ___, this doesn't happen. In HTML, this becomes an <hr>.

Not available

What works as in the standard