Mermaid to PNG Converter
Paste Mermaid code and download a crisp PNG or SVG. Pick the scale, theme and background, or copy the image straight to your clipboard.
- Free, no watermark
- Up to 4x resolution
- Transparent background
- Nothing uploaded
Mermaid code
Image preview
Loading…Loading the Mermaid renderer…
How to convert Mermaid to PNG
- Paste your Mermaid code into the box on the left. Flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, mindmaps and every other Mermaid diagram type work.
- Pick the look. Choose a light or dark theme, a solid or transparent background, and a scale from 1x to 4x. The size of the final image is shown next to the buttons.
- Click Download PNG. The image is created in your browser in about a second. Use Copy image to paste it straight into Slack, Google Docs, Notion or an email.
Why use this converter
Sharp at any size
Export at 2x for slides and docs, or 3x–4x for print and retina screens. Text stays crisp instead of blurry.
Transparent background
Drop the diagram onto colored slides, dark-mode docs or a website without a white box around it.
Light and dark themes
Match the diagram to where it will live. The dark theme uses high-contrast colors that stay readable.
Private by design
Your code never leaves your browser. There is no upload, no server render and no account.
PNG or SVG: which should you download?
PNG is a regular image. It works everywhere: Word, PowerPoint, Google Slides, Confluence, Jira, GitHub comments, chat apps and email. Pick PNG when you just need the picture to show up.
SVG is a vector file. It scales to any size without losing quality, it is usually smaller, and you can edit it in Figma, Illustrator or Inkscape. This converter writes text as real SVG text rather than embedded HTML, so labels survive the import. Pick SVG for websites and design work.
Need a PDF? Download the SVG and open it in your browser, then print to PDF. Our guide on exporting Mermaid diagrams to PNG, SVG and PDF covers this and the command-line options.
Tips for a better image
- Use
flowchart LRinstead ofTDfor wide slides, andTDfor tall documents. - Keep labels short. Long labels make boxes wide and shrink everything else when the image is scaled to fit.
- If the image comes out blank or cut off, the code probably has an error. Paste it into the Mermaid syntax checker to find the line.
- Want to style nodes? See how to change Mermaid colors and themes.
Frequently asked questions
Is this Mermaid to PNG converter free?
Yes. It is completely free, with no sign-up, no watermark and no limit on how many images you export.
Is my diagram code uploaded anywhere?
No. Rendering and PNG conversion both happen inside your browser with JavaScript. Your code is never sent to a server.
How do I get a transparent PNG from Mermaid?
Set Background to Transparent, then click Download PNG. The preview shows a checkerboard where the image will be see-through.
What resolution are the PNG files?
1x matches the diagram's natural size. 2x, 3x and 4x multiply the width and height, so a 4x export has 16 times as many pixels. The exact size is shown before you download.
Can I convert Mermaid to PNG from the command line?
Yes. Install the official CLI with npm install -g @mermaid-js/mermaid-cli and run mmdc -i diagram.mmd -o diagram.png. This page is faster for one-off images.
Why does my exported image look different from GitHub?
GitHub uses its own Mermaid version and theme. This tool renders with Mermaid 10.9 and our light or dark theme. The structure is identical; only colors and fonts differ.