Skip to content
MermaidViewer

Mermaid to PNG

Convert mermaid to PNG in the browser. Free is 1× with a watermark. Starter goes to 4×. Pro goes to 8× in the editor.

Open in full editor

Free PNGs are 1× with a small watermark. Starter unlocks up to 4× with no watermark. Pro unlocks up to 8×, plus JPG, SVG and PDF.

How to convert Mermaid to PNG

  1. Paste or type your Mermaid code in the box above.
  2. Pick a theme, background and resolution. Scales above your plan stay disabled.
  3. Click Download PNG, or Copy image. Free downloads are 1× and include a small watermark.

Why export Mermaid as PNG?

PNG is the most widely supported image format. It works in slide decks, wikis that don't render Mermaid, issue trackers, chat apps and email. Free export is 1×. Starter adds 2×, 3× and 4× for high-DPI screens. Pro adds 6× and 8× in the full editor.

Tips for the best PNG output

  • Use a transparent background when placing the diagram on coloured slides.
  • Use 4× on Starter for presentations. Use 6× or 8× on Pro, in the editor, when the image will be printed large.
  • Labels are rendered as SVG text before the raster step, so fonts stay crisp and nothing is clipped.
  • Need a vector file? SVG and PDF downloads are on Pro. Preview them with the Mermaid to SVG and Mermaid to PDF tools.

Rendering happens in your browser. Your diagram is not uploaded when you convert it.

Use this page when you need mermaid to png without putting the diagram on a server. Paste the code, pick a scale and a background, and download the image. The conversion runs in your browser. The diagram is not uploaded for the convert action. Free downloads are 1× with a small watermark. This page offers 1×, 2×, 3×, and 4×. Free can select 1×. Starter ($6.99/month or $69.90/year) unlocks up to 4× with no watermark. The editor adds 6× and 8× on Pro ($11.99/month or $119.90/year).

PNG is the file people can open everywhere. That is the whole reason to make one. A vector is sharper, and a PDF prints more cleanly, but a PNG survives Slack, email, a ticket, a slide deck, and a wiki that still shows Mermaid as a code block. If the destination renders Mermaid, you might not need the file at all. If it does not, PNG is the safe handoff.

When a PNG is the right export

Choose PNG for a picture that will be placed, not edited. Slides are the usual case. A 2x or 3x export stays readable when the projector is worse than your laptop. Chat is the other usual case. You paste the image, someone understands the flow, and nobody has to install a plugin. Word processors and older wikis belong in the same bucket. They will not run the Mermaid library. They will show a PNG without an argument.

Choose something else when the next person has to change the picture as a drawing, or when it will be printed at a size you cannot predict. SVG stays sharp at any zoom. PDF is the better attachment for a spec. This page is for the raster file. The SVG converter, the PDF converter, and the export guide cover the other paths.

What you control on this page

The tool gives you a theme, a background, and a resolution. Theme changes the Mermaid palette before the raster exists, so pick it first. A dark theme exported on a transparent background can look like floating light text. A light theme on white is the boring default that works in almost every doc.

Background is the choice people skip and then redo. Transparent is what you want on a colored slide, so the slide's own color shows around the boxes. Solid white is what you want in a doc with a white page, and in tools that paint "transparent" as black. If a PNG arrives with a black rectangle, export again on white. That is almost always the cause.

The menu lists 1×, 2×, 3×, and 4×. Free can select 1×, and that file includes a small watermark. Starter can select up to 4× with no watermark. The editor adds 6× and 8× on Pro. There is no 3× cap and no 6× cap.

Labels are drawn as text in the SVG that this page then rasterizes, which is why a 2x or 3x file stays clearer than a screenshot of the browser. A screenshot also grabs the toolbar and the scroll position. Use the download button.

The same limits as the editor

Free PNG is 1× with a small watermark. SVG and PDF downloads are on Pro. You do not need an account to download a 1× PNG, and that file includes a small watermark. Starter removes it and unlocks up to 4×. Pro unlocks up to 8× plus JPG, SVG, and PDF.

/editor uses this same plan. Free is 1× with a watermark. Starter ($6.99 a month or $69.90 a year) removes the watermark and unlocks PNG up to 4×. Pro ($11.99 a month or $119.90 a year) unlocks PNG and JPG up to 8×, and adds SVG and PDF. A snippet on this page is not a separate free export.

A diagram worth exporting

Paste this, export at 2x on white, and you have a file you can drop into a doc. Then change one label and export again. The point of Mermaid is that the second export is a text edit.

Mermaid diagram
mermaid
flowchart LR
  A[Paste code] --> B[Pick 2x]
  B --> C[Download PNG]
  C --> D[Keep the source too]
Open in the live editor

Keep the Mermaid next to the PNG. The image will not tell you what the arrow used to say. A README can hold the fence, and the PNG can be the copy for the slide. When the flow changes, edit the fence and export again. The Markdown viewer is how you check a file that already has several fences before you turn one of them into an image.

Failures that look like export bugs

A blank preview is usually syntax. The diagram keyword has to be the start of the diagram, brackets have to match, and a reserved word used as an ID will confuse the parser. Fix the code until the preview shows the picture. The exporter can only rasterize what rendered.

A blurry PNG is scale. Free is locked to 1×. Move to 2×, 3×, or 4× on Starter, or to 6× or 8× on Pro in the editor, before you blame the font. A clipped label is often a node that is one long sentence. Shorten the label and put the sentence in the document under the image. A huge file is a 3x export of a huge diagram. Split the diagram. A forty-node flowchart is hard to read as a PNG even when every pixel is sharp.

Very wide pictures become wide images. That is honest, and it is awkward in a narrow column. Change the direction to top-down, or split the story. The exporter will not invent a layout the syntax did not ask for.

A simple habit

Write the Mermaid, preview it here, download the PNG, and store the text. Use transparent when the slide has its own background color. Use 4× on Starter when the image will be shown large, or 8× on Pro in the editor. SVG download on the SVG converter is on Pro. Nothing about this convert action uploads the diagram. Free PNG includes the watermark here and in the editor. Read pricing before you expect a clean high-resolution file.

Frequently asked questions

Is the Mermaid to PNG converter free?

The preview and a 1× PNG are free, with a small watermark and no sign-up. Watermark-free PNG up to 4× is on Starter ($6.99/month or $69.90/year).

Can I export a PNG with a transparent background?

Yes. Choose Transparent in the Background menu before downloading. The free watermark is a footer strip, not a stamp across the diagram.

What resolution are the PNG files?

This page offers 1×, 2×, 3× and 4×. Free can select 1×. Starter can select up to 4×. The full editor also offers 6× and 8×, which need Pro (max 8×). There is no 6× cap on Pro and no 3× cap on paid plans.

Is my diagram uploaded anywhere?

No. Rendering and PNG conversion happen entirely in your browser.

More converters