Mermaid to PNG converter
Paste Mermaid source into the editor above, then export a PNG at the resolution your document or slide actually needs.
PNG keeps sharp edges and supports a transparent background, which makes it the usual choice for slides, issue trackers, and documentation that cannot display SVG.
How to convert Mermaid to PNG
- Paste or type your Mermaid source in the editor above and wait for the preview to render without a parse error.
- Open the export options and pick a scale. Scale multiplies both width and height, so 2× has four times the pixels of 1×.
- Choose a transparent background to drop the diagram onto any slide colour, or a solid one if the destination needs it.
- Set the padding and filename, then download the PNG.
PNG settings
| Scale | Pixels for an 800 × 500 diagram | Where it fits |
|---|---|---|
| 1× | 800 × 500 | Inline in a web page or a chat message. |
| 2× | 1600 × 1000 | Slides and high-density screens. A good default. |
| 3× | 2400 × 1500 | Large printed handouts. |
| 4× | 3200 × 2000 | Posters and anything that will be zoomed into. |
The editor refuses a canvas above 16,384 pixels on either side or 16 megapixels in total, because browsers cannot reliably rasterise more than that. If a 4× export is rejected, drop to 2× or export SVG instead.
Frequently asked questions
Is the PNG background transparent?
It can be. Transparent is the default, and White, Black or a custom colour are available in the same control. JPEG has no transparency, so pick PNG when you need it.
How do I get a higher-resolution PNG?
Raise the scale rather than enlarging the file afterwards. Scale re-renders the diagram at a larger size, so text and lines stay sharp instead of becoming blurry.
Is my diagram uploaded anywhere to convert it?
No. Rendering and the PNG encode both happen in your browser, and the file is written by the browser download mechanism.
Keep reading
Export guide · the example loaded above · all guides
mermaid.tools is an independent editor not affiliated with the Mermaid.js project or Mermaid Chart / mermaid.ai. Conversion runs in your browser with Mermaid 11.17.2; nothing is uploaded.