How do I export a high-resolution PNG from a Mermaid diagram?

About 2 min · Updated 2026-09-13

The default download is already 2x, which is sharper than most online renderers give you. The menu offers 3x, and SVG is vector — it stays sharp at any size, which is what you want for print.

Short answer

"Download PNG" already gives you 2x. The download menu offers 3x. For print or a large screen, export SVG — it's vector and has no resolution at all.

Which one when

Use Pick
Chat, inline in a doc PNG 2x (default), small file
Word or slides, may be scaled up PNG 3x, or use Word / PowerPoint export directly (those embed at 3x)
Print, posters, projection SVG
On a web page SVG

Transparent or filled background

The download menu switches between a transparent background and the theme's background. Transparent sits well on a dark document; a filled background is safer when you're sending the file to someone, since some chat apps put transparent PNGs on black.

One ceiling on very large diagrams

Very large bitmaps hit the browser canvas area limit. When that happens the scale drops one step automatically and tells you; if it still doesn't fit, export SVG — vector has no such limit.

Something to test with

Export the same diagram at 2x, 3x and as SVG, then zoom all three to 300% — the difference shows up immediately:

flowchart LR
    A[Raw data] --> B[Clean]
    B --> C[Model]
    C --> D[Report]
    D --> E{Holds up?}
    E -- Yes --> F[Archive]
    E -- No --> B
Open in the editorEdit the text, switch themes and download PNG, Word or PowerPoint from there.

About ×4

×4 is part of Lite. For nearly everything, 3x and SVG are enough — and both are free, permanently.

Try it in the editor

More guides

All guidesLooking for a specific answer? Try the Help Center