MD Diagram guide

Export a Mermaid diagram as PNG or SVG

For the places that cannot draw Mermaid themselves: Word, slides, tickets, and chat.

PNG or SVG?

Steps

  1. Open MD Diagram and paste your Mermaid code, or press Start from a template (Flowchart, Sequence, Class, State, Entity relationship, Gantt, Pie, Mind map, or Timeline).
  2. Watch the diagram draw as you type. A syntax error marks its line; fix it before you download.
  3. Pick a theme in the toolbar: Default, Neutral, Forest, or Dark.
  4. Press PNG or SVG at the right of the toolbar.

Free or paid: editing and the live preview are free and need no account. Each download spends 1 credit and needs you to sign in. Every account gets 3 free downloads a month. For more, a 25-credit pack is a one-time $3.00, or Pro covers 300 downloads a month, $5.00 for 30 days.

The command-line alternative

If you export diagrams in a build, the Mermaid CLI does it with mmdc -i diagram.mmd -o diagram.png. It needs Node.js and a headless browser. MD Diagram is for the one-off case: nothing to install, and you see the result before you download.

Good to know

Related

See the full MD Diagram guide. Credits are shared across all nine tools; see pricing.

Try our other tools

One account and one credit pack work in all of them. Previews are free.

MD Converter Markdown to PDF, DOCX and HTML with a live preview. MD Chat A ChatGPT, Claude or Gemini answer as a clean Word file or PDF. MD Publisher Front matter, JSON-LD and social images for a post. MD Reverse HTML, DOCX, PDF or text back to Markdown. MD Slides An outline becomes a PDF, PowerPoint or HTML deck. MD Clip Save a web page, email or HTML as clean Markdown. MD Diagram Mermaid diagrams with a live editor and templates. MD Diff Compare two drafts, then accept or reject changes. Adoneinu SEO Analyzer A free audit of a public domain with a fix plan.