Mermaid to PNG Converter
Paste Mermaid code, check the preview and download a PNG image. Export is free, adds no watermark and needs no account.
Try it
Edit the code; the preview updates as you type.
Rendering diagram…
Free Mermaid to PNG export, no watermark
PNG works almost everywhere: slides, Word and Google Docs, chat apps, tickets and email. Pick a higher scale for sharp text on high-resolution screens and in print.
How to convert Mermaid to PNG
- Paste your Mermaid code into the playground above, or edit the example. The preview updates as you type.
- Check the preview. If the code has a syntax error, the message names the line that failed.
- Click PNG in the playground to download the file. For a different scale (1x to 4x) or a transparent background, choose Open in editor and use the Export menu there.
- The file downloads straight from your browser. Your code is not uploaded anywhere.
Example Mermaid code
The playground above starts with this diagram. Replace it with your own code, or paste it into any tool that renders Mermaid.
flowchart LR
Code[Mermaid code] --> Preview[Live preview]
Preview --> Export{Export}
Export -->|PNG| Slides[Slides and docs]
Export -->|SVG| Web[Websites]
Export -->|PDF| Print[Print]PNG export options
| Option | What it does |
|---|---|
1x | The diagram at its natural size. Smallest file. |
2x | Sharp on most laptop and phone screens. |
3x (default) | Good for slides on a projector or a 4K screen. |
4x | For print and zooming in on large diagrams. |
Transparent background | No background color, so the diagram sits on any slide or page color. |
Copy Image | Puts the PNG on the clipboard to paste straight into Slack, Docs or an email. |
When to choose PNG
- Slides and presentations
- Word, Google Docs and Notion pages
- Chat messages, tickets and email
- Any tool that does not render Mermaid
| Format | Best for |
|---|---|
PNG | Slides, documents, chat and email; up to 4x for sharp text |
SVG | Websites, design tools and large prints; scales without blur |
PDF | Printing, attachments and reports; page sized to the diagram |
Tips for a better PNG
- Very large diagrams are scaled down automatically if the selected scale would exceed the browser’s maximum canvas size, so the export never comes out blank.
- With dark mode on, the default theme exports on a dark background. Switch the diagram theme or turn on the transparent background for light slides.
- For logos, websites or anything you need to scale without blur, export SVG instead.
- Need PNG files in a build pipeline? The official Mermaid CLI (mmdc) converts .mmd files from the command line.
Frequently asked questions
Is the PNG export free?
Yes. Every scale from 1x to 4x, the transparent background and Copy Image are free, need no account and add no watermark.
How do I get a high-resolution PNG from Mermaid?
Choose Open in editor, open the Export menu, pick 3x or 4x, then click PNG. The image is rendered at that pixel ratio, so text stays sharp. The playground on this page downloads at 3x.
Can I export a PNG with a transparent background?
Yes. Choose Open in editor and tick Transparent background in the Export menu before you download.
Is my diagram uploaded to convert it?
No. The diagram is rendered and converted to PNG in your browser. The code never leaves your device.
Why does my exported PNG look different from the preview?
The export uses the diagram’s natural size rather than the zoom level in the preview. Colors follow the selected diagram theme and light or dark mode.