Docs, README, and issues
Export PNG for the broadest compatibility, or SVG if the platform renders vectors and you want it to stay sharp.
Image export · every Mermaid format
Paste Mermaid code, preview it, then download it as an image. This is the place to start when you just need a diagram image and are not sure which format to use — export PNG, SVG, JPG, WebP, or PDF from one editor, all rendered locally in your browser.
No signup · No watermark · Local browser rendering · PNG / SVG / JPG / WebP / PDF · 1x / 2x / 4x output
Export controls activate after your diagram renders locally.
For most destinations, PNG is the safe default — it looks identical everywhere and needs no special support. Choose SVG when you want a crisp vector that scales for the web, Figma, or print. Choose PDF when the diagram goes into a document or needs to print at any size. JPG only helps with legacy upload forms that reject PNG, and WebP gives the smallest file for modern web pages. When in doubt, export PNG at 2x and move on.
Export PNG for the broadest compatibility, or SVG if the platform renders vectors and you want it to stay sharp.
Export a transparent PNG at 4x so the diagram sits cleanly on any slide without a white box and stays sharp on projectors.
Export WebP for the smallest file, or SVG when you want the diagram to scale with the layout.
One 16-line flowchart, exported from this editor in the Clean Docs style on a white background at 2x. Sizes change with the diagram, but the ratios between formats hold. Every format is free and has no watermark; the Mermaid to image converter exports all five from one preview.
| Format | File size at 2x | Transparent background | Resizing | Best for |
|---|---|---|---|---|
| PNG | 178 KB | Yes | Fixed pixels — pick 2x or 4x | Docs, slides, README files, anywhere |
| JPG | 85 KB | No — filled white | Fixed pixels | Upload forms and tools that only take JPG |
| WebP | 38 KB (54 KB transparent) | Yes | Fixed pixels | Websites and blogs where page weight matters |
| SVG | 147 KB, fonts embedded | Yes | Sharp at any size | Docs sites and pages viewed in a browser |
| 129 KB | No — white page | Page sized to the diagram; 2x or 4x image inside | Attaching, printing, and sending for review |
If yes and you want infinite scaling, use SVG. If unsure, use PNG — it always works.
Export PDF for attaching, printing, or sending for review: one white page sized to the diagram.
Use a transparent PNG or WebP so the diagram has no background box behind it.
FAQ
Paste your Mermaid code into the editor above, preview the result, choose an export style and scale, then download it as PNG, SVG, JPG, WebP, or PDF. Rendering happens locally in your browser.
PNG is the safest default because it looks the same everywhere. Use SVG for scalable vector output, PDF for documents and printing, WebP for small web files, and JPG only for forms that reject PNG.
Yes. Every format is free for single-diagram use and never adds a watermark. No signup is required and your diagram code is not uploaded.
Yes. Choose 2x or 4x scale for sharp output, and pick a transparent export style if you need the image to have no background. See the high-resolution and transparent background guides for details.