Mermaid to Image Converter

Convert Mermaid code or an MMD file to PNG, SVG, JPG, or WebP. Preview the diagram, choose a raster scale and background, and download the image in your browser.

Diagram preview

Rendering diagram…

How to convert Mermaid to an image

Paste Mermaid code or open a local .mmd, .mermaid, .md, or .txt file. The converter accepts raw Mermaid and a single Mermaid code block copied from Markdown. Try the built-in flowchart, sequence diagram, or ER diagram if you want to see both the source and the result.

Check the preview, choose a format, and select Download image. For example, open release-flow.mmd and choose PNG at 2× to save a sharper version of the flowchart for a presentation. The image contains the entire diagram.

Which image format should I choose?

  • PNG is a lossless choice for diagrams in slides and documents. It can keep the background transparent.
  • SVG keeps the diagram vector so you can enlarge it without pixelation. Raster scale and background controls do not apply to SVG.
  • JPG uses a white background and works in most apps that accept images.
  • WebP is a convenient option for publishing diagrams on the web and can keep transparency.

Use 1× for the diagram’s natural pixel size or 2× for twice the width and height. The scale changes the downloaded image dimensions while keeping the same layout.

Using your diagram elsewhere

Rendering and export run in your browser. Keep the original Mermaid code if you want to edit the diagram later. Open the Mermaid Previewer to inspect a diagram, or use the Mermaid to PDF Converter for a vector PDF with paper size options.

Mermaid · MIT