Export Diagrams
Mermaid Studio lets you export your diagrams as image files for use in documentation, presentations, or anywhere else you need them.
Export Formats
Section titled “Export Formats”You can export diagrams in two formats:
- PNG: Raster image format, best for presentations and web use
- SVG: Vector format, scales perfectly at any size
How to Export
Section titled “How to Export”Save as PNG
Section titled “Save as PNG”- Open your Mermaid file in the editor
- Right-click in the editor and select Save as PNG…
- Or use the keyboard shortcut Ctrl+Alt+Shift+P
- Choose export options in the dialog
- Select where to save the file
Save as SVG
Section titled “Save as SVG”- Open your Mermaid file in the editor
- Right-click in the editor and select Save as SVG…
- Or use the keyboard shortcut Ctrl+Alt+Shift+S
- Select where to save the file
Copy as SVG
Section titled “Copy as SVG”To copy the SVG directly to your clipboard:
- Right-click in the editor and select Copy as SVG
- Or use Ctrl+Alt+Shift+C
- Paste the SVG into your target application
PNG Export Options
Section titled “PNG Export Options”When exporting to PNG, you can configure the output size:
- Auto: Uses the diagram’s natural size
- Width: Specify a fixed width in pixels (height adjusts proportionally)
- Height: Specify a fixed height in pixels (width adjusts proportionally)
You can also choose to open the file in the IDE after saving.
Theme Matching
Section titled “Theme Matching”Exported images use the same theme as your IDE:
- If you are using a dark IDE theme, exports use dark diagram colors
- If you are using a light IDE theme, exports use light diagram colors
To export with a different theme, temporarily switch your IDE theme before exporting.
- SVG for documentation: Use SVG when the diagram will be viewed at different sizes or when you need crisp text at any zoom level
- PNG for presentations: Use PNG when inserting into PowerPoint, Keynote, or similar tools
- High-resolution PNG: Set a larger width (e.g., 1600px or 2000px) for sharper images in presentations