Mermaid Diagrams in Notion

Notion supports Mermaid diagrams natively through code blocks. Type /code to create a code block, select 'Mermaid' as the language, and your diagram renders inline. No extensions needed.

Step-by-Step Guide

1

Create a Mermaid code block

Type /code in any Notion page to insert a code block. Click the language selector in the top-right of the block and choose 'Mermaid'. Paste or type your Mermaid code.

2

Write your diagram code

The code block shows a live preview of your diagram below the code. Flowcharts, sequence diagrams, ER diagrams, Gantt charts, and most Mermaid diagram types are supported.

flowchart LR
    Idea --> Design --> Build --> Ship
3

Toggle between code and preview

Click the diagram preview to expand it. Click the code block header to collapse back to edit mode. The diagram updates automatically as you type.

4

Design complex diagrams in our editor

Notion's code block has limited editing space. For complex diagrams, design in our editor with live preview, autocomplete, and error highlighting, then copy-paste the final code into Notion.

Tips

  • Notion's Mermaid renderer may lag behind the latest Mermaid.js version — test newer syntax in our editor first
  • You can embed diagrams in Notion database pages and templates
  • Notion's dark mode can affect diagram colors — preview in both themes
  • For team wikis, Mermaid diagrams stay editable by anyone with page access

Design Your Diagram First

Use our editor with live preview, autocomplete, and theming — then copy-paste into Notion.

Open Editor

Frequently Asked Questions

More Integrations