Overview
Enhanced markdown (also called “Notion-flavored Markdown”) is an extended Markdown format that supports all Notion block and rich text types. It is used by the markdown content endpoints:POST /v1/pages (via the markdown body param), GET /v1/pages/:page_id/markdown, and PATCH /v1/pages/:page_id/markdown.
This format extends standard Markdown with XML-like tags and attribute lists to represent Notion-specific features such as callouts, toggles, columns, mentions, and block-level colors.
Indentation
Use tabs for indentation. Child blocks are indented one tab deeper than their parent.Escaping
Use backslashes to escape special characters. The following characters should be escaped outside of code blocks:\ * ~ ` $ [ ] < > { } | ^
Do not escape characters inside code blocks. Code block content is literal.
Block types
Text
Headings
Lists
To-do
Quote
<br> tags within a single > line:
> lines render as separate quote blocks, not a single multi-line quote.
Toggle
{toggle="true"} attribute:
Callout
callout and optional attributes. The closing fence is three or more colons on its own line.
Code
```mermaid for Mermaid diagrams.
Equation
Table
false). Color precedence from highest to lowest: cell, row, column. Table cells can only contain rich text.
Divider
Empty line
Columns
Media blocks
Page and database references
Table of contents
Synced block
Rich text formatting
| Format | Syntax |
|---|---|
| Bold | **text** |
| Italic | *text* |
| Strikethrough | ~~text~~ |
| Underline | <span underline="true">text</span> |
| Inline code | `code` |
| Link | [text](URL) |
| Inline math | $equation$ |
| Line break | <br> |
| Color | <span color="Color">text</span> |
Mentions
<mention-user url="URL"/>.
Custom emoji
Citations
Colors
Text colors
gray, brown, orange, yellow, green, blue, purple, pink, red
Background colors
gray_bg, brown_bg, orange_bg, yellow_bg, green_bg, blue_bg, purple_bg, pink_bg, red_bg
Usage
- Block colors: Add
{color="Color"}attribute to the first line of any block. - Inline text colors: Use
<span color="Color">Rich text</span>.