Skip to content

Share & export

Embed diagrams

Embed SayDiagram in Notion, docs sites, and blogs with iframe or oEmbed. Public and unlisted share links only.

On this page3 sections
  1. Iframe (Notion & docs)
  2. Query params
  3. oEmbed

Iframe (Notion & docs)

Publish a diagram as Public or Unlisted, then paste an iframe into Notion, Confluence, or any HTML page. Team workspaces can lock public sharing from Profile → Team.

  1. Open the diagram → Share → set Unlisted or Public.
  2. Copy the embed code (or use the snippet below with your slug).
  3. In Notion: type /embed and paste the embed URL (/embed/…), not the share page.
  4. Recommended height: 480px. Width: 100%.
<iframe src="https://saydiagram.com/embed/your-diagram-slug" width="100%" height="480" style="border:0;" allowfullscreen loading="lazy" title="SayDiagram diagram"></iframe>

Query params

  • view=preview|arranged — start in Mermaid preview or Arrange canvas
  • theme=light|dark — embed chrome background
  • height=480 — fixed pixel height (default fills the iframe)

Embeds post { type: "saydiagram:embed-resize", height } to the parent window so custom hosts can resize the iframe.

oEmbed

Consumers can resolve a share or embed URL via:

GET https://saydiagram.com/api/oembed?url=https%3A%2F%2Fsaydiagram.com%2Fd%2Fyour-diagram-slug

Returns JSON with html iframe markup. Only Public/Unlisted diagrams resolve; private diagrams return 404.

Learn Mermaid · FAQ · Pricing · Dashboard