Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline)

Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline), a VS Code extension by Zovo

Free, no sign-in, works offline. Write Mermaid on the left and see the diagram on the right while you type, in .mmd files and in mermaid blocks inside Markdown. No login, no AI, no account and no network.

Install in VS CodeOpen the Marketplace page

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.mermaid-viewer, version 0.3.3.

VS Code with a sequence diagram open in Mermaid Viewer's split editor. The .mmd text is on the left. On the right, the live diagram shows the User, App, API server and Database lanes with numbered messages and an alt block. The toolbar shows Theme, Background, the zoom buttons, Export and "Mermaid 12.3.0 · sequence" with the time it took.

Real output from VS Code 1.142 on macOS: sequence.mmd from scripts/make-samples.mjs, opened with "Open Diagram Editor". scripts/e2e-editor.mjs installed the packaged extension in a clean VS Code profile and saved the window through the debug port.

Quick start

  1. Install the extension.
  2. Open a .mmd or .mermaid file and run "Mermaid Viewer: Open Diagram Editor" from the Command Palette, or click the preview icon at the top right of the editor (Cmd+K V, or Ctrl+K V on Windows and Linux).
  3. In a Markdown file, click "Edit diagram" above a mermaid block.
  4. No file yet? Run "Mermaid Viewer: New Diagram from Template".

"Mermaid Viewer: Get Started" in the Command Palette opens a short tour.

Questions people ask

Is Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline) free?

Yes. Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline) is free and MIT licensed.

How do I install Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline)?

Click "Install in VS Code" above, or search for zovo.mermaid-viewer in the Extensions view.

Why this one

Reviews of Mermaid extensions on the Marketplace name the same problems again and again. This is what Mermaid Viewer does about each one, checked in a real VS Code with scripts/e2e-editor.mjs:

What reviewers asked forWhat Mermaid Viewer does (measured)
A preview without a login, including behind a company proxy (review, Oct 2026; review, Oct 2026)No account, no sign-in prompt, no AI. The whole release check made 0 network requests from the preview.
A way to set the PNG width or height (review, 28 Oct 2026)Width or Height in the Export menu gives exactly that size. A width of 2,000 px gave a PNG 2,000 px wide.
Smaller SVG files that work in an Azure DevOps wiki (same review)SVG export drops unused CSS and rounds coordinates: the sample flowchart went from 66 KB (Mermaid's own SVG) to 35 KB. "Text labels for wikis" writes labels as SVG text, with no HTML foreignObject, and the file has no remote URL.
No slow, pushy extras (review, Oct 2026)No sync, no chat and no pop-ups. CodeLens shows only above `mermaid blocks, never on other code blocks, and a setting turns it off.
Zoom past 500 % on large charts (review, Mar 2026)Zoom from 1 % to 3,200 % at the pointer. Trackpad: two fingers pan, a pinch zooms.
Diagrams inside Markdown, not only .mmd files (review)Every mermaid block of a Markdown file in one preview, and "Edit diagram" for each block. A 200-block file and the 116-block Mermaid flowchart docs page both open.
Labels that are not cut off (review, Jun 2025)The release check measures every label against its box in 16 sample diagrams.

Mermaid Viewer is an independent extension by Zovo. It is not made by, and does not replace, any other publisher's extension.

Mermaid blocks in Markdown

A README.md in VS Code with "Edit diagram | Preview" above each mermaid block, next to the preview that lists every diagram of the file.
One block of that README.md open as its own file, "README diagram 1.mmd", with the breadcrumb README.md, next to its live diagram.

Help while you type

Export

The Export menu over the flowchart sample: Scale 1x, 2x or 4x, Width 2000 px, Height empty, "PNG size: 2000 × 5367 px (set width)", the "Text labels for wikis" box, and the buttons Save PNG, Copy PNG, Save SVG, Copy SVG code and Save PDF.
OptionWhat it does
Scale1x, 2x or 4x of the drawn size
Width, HeightExact size in pixels. Set one and the other follows the shape. Set both and the PNG is the largest size that fits in that box. The menu shows the final size before you save.
Text labels for wikisLabels as plain SVG text instead of HTML. Use it for Azure DevOps and GitHub wikis and for tools that drop HTML in SVG.
Save PNG, Save SVGA save dialog next to the source file. In Markdown, the file name gets the diagram number.
Copy PNG, Copy SVG codeTo the clipboard, ready to paste into a chat, an issue or a slide
Save PDFEvery diagram of the file in one PDF, with a title page that lists them

Exports use the background from the toolbar: the editor color, white, transparent or a custom color. SVG files name no web fonts and load nothing from the internet.

"Export All Diagrams in Workspace" writes every diagram of every .mmd, .mermaid and Markdown file in the folder to SVG, PNG or both, into mermaid-export/ with the same folders as the sources. Diagrams that cannot be drawn are listed at the end.

Big and untrusted files

Themes

The Mermaid theme follows VS Code: dark in dark themes, default in light ones. The toolbar also offers default, dark, forest, neutral and base. A theme set inside the diagram wins. The background can be the editor color, white, transparent or a custom color.

Settings

SettingDefaultWhat it does
mermaidViewer.themeautoMermaid theme for new previews
mermaidViewer.backgroundthemetheme, white, transparent or custom
mermaidViewer.customBackground#f5f5f0The custom color
mermaidViewer.wheelautoauto: a mouse wheel zooms, two fingers on a trackpad pan. zoom or pan for one behavior.
mermaidViewer.updateDelayMs100Pause after typing before the preview draws again
mermaidViewer.maxTextSize500000Largest diagram in characters
mermaidViewer.maxEdges2000Largest diagram in links
mermaidViewer.renderTimeoutSeconds10Time limit for one drawing
mermaidViewer.languageIds["mermaid"]More language ids to treat as Mermaid
mermaidViewer.codeLenstrue"Edit diagram" and "Preview" above mermaid blocks in Markdown
mermaidViewer.saveMarkdownOnBlockSavetrueSave the Markdown file when you save a block, if it had no other changes
mermaidViewer.svgTextLabelsfalseSVG export with plain text labels by default
mermaidViewer.exportFoldermermaid-exportFolder for "Export All Diagrams in Workspace"
mermaidViewer.askForRatingtrueOne rating request after some use
mermaidViewer.showSupportLinkstrueThe small Rate, Sponsor and More free viewers links under the preview

Privacy

Mermaid Viewer sends nothing anywhere. It has no telemetry, no account and no AI. The preview and export pages block every network request with their Content Security Policy, and the extension makes no network calls. Links you click in the footer (Rate, Sponsor) open in your browser.

Limits

License

MIT. Mermaid is MIT licensed. Its bundled parts and their licenses are listed in THIRD-PARTY-NOTICES.md.

Guides

Install Mermaid Diagram Editor & Viewer, Live Diagram Preview (MMD, PNG/SVG Export, Offline)

Click the button to open VS Code and install it, or press Ctrl+P (Cmd+P on macOS) in VS Code and run ext install zovo.mermaid-viewer.

Free, MIT license. Needs VS Code 1.90.0 or newer. Extension ID zovo.mermaid-viewer, version 0.3.3.

Source code and issues are on GitHub.

All our VS Code extensions

Zovo Pro and support

Zovo Pro: USD 19 once, every Zovo viewer. It turns on the Pro tools in this extension and in the other Zovo extensions you use. The free features stay free.

After a card payment your license key shows on the next page. Paste it with the command "Zovo Pro: Enter a key".

You can also support the work with no Pro:

Need your format supported?

Open a format request with a sample file, and I reply there whether it can be done. For USD 299 once, through this GitHub Sponsors tier, I add your file format or a missing feature to this extension, with tests, within 7 days.