Mermaid Design

Export & Share

When your diagram is ready, click Export in the navbar to open the export dialog. Everything is generated locally in your browser — no upload, no watermark, no account.

Image formats

FormatBest for
SVGDocs, wikis, and web pages — infinitely scalable vector output
PNGSlides, tickets, and chat — a universally supported bitmap
JPGSmaller files when transparency isn’t needed
WebPModern image format with great compression

Bitmap exports (PNG / JPG / WebP) can be rendered at 1x, 2x, or 4x resolution for crisp results on high-density displays. A transparent background toggle is available for PNG and WebP.

The exported image always matches the preview — what you see is what you download.

ASCII export

In ASCII mode, the export dialog offers TXT (plain text): the rendered text diagram, ready to paste into code comments, docs, or terminals.

Exporting the theme config

The export dialog also includes a Theme Config section for reuse outside mermaid.design:

  • Copy JSON — copies the current theme variables as a JSON object
  • Download JSON — saves a mermaid-theme.json file
  • Copy frontmatter — copies the theme as Mermaid frontmatter you can paste at the top of any .mmd file or Markdown code block:
---
config:
  theme: base
  themeVariables:
    primaryColor: '#...'
---

Any Mermaid renderer that supports themeVariables (the Mermaid CLI, GitHub, docs pipelines) can apply the exported theme.

Sharing your work

Diagrams are stored only in your browser’s local storage — there is no server-side share link. To share a diagram:

  1. Export it as an image (or TXT for ASCII), or
  2. Copy the Mermaid code and send it directly — the recipient can paste it into mermaid.design and pick up exactly where you left off.

Your code, theme, and layout persist automatically between sessions on the same device and browser.