D2 Diagram Viewer & D2 Preview icon

D2 Diagram Viewer & D2 Preview Pro Available

Write D2 diagrams in VS Code and see them drawn beside the text as you type. The D2 engine is built in, so there is nothing else to install. Works offline. Made by Zovo.

MIT / Free Core · Zero telemetry · Works offline · Published by zovo

Pro adds Export PNG, PDF and SVG and Batch export. Get Zovo Pro, $19 once →

Version
0.1.0
VS Code Installs
17
Open VSX Downloads
252
Updated
2026-11-16
Category
Diagrams & Media
Extension ID
zovo.zovo-d2-viewer
Editors
VS Code, Cursor, Windsurf, VSCodium
Quick install CLI (VS Code · Cursor · Windsurf)
code --install-extension zovo.zovo-d2-viewer
cursor --install-extension zovo.zovo-d2-viewer
windsurf --install-extension zovo.zovo-d2-viewer

Why use it

  1. A live D2 preview next to the editor. It draws again a moment after you stop typing, and it keeps your zoom and position while you edit.
  2. Pan with the mouse, zoom with the wheel or the + and - buttons, Fit to see the whole diagram, 100% for actual size.
  3. The preview follows VS Code: a dark VS Code theme gets a dark D2 theme, a light one a light D2 theme, unless the .d2 file sets its own.
  4. Pick any of the 20 D2 themes for one preview, change the layout direction or turn on the sketch style. Only the preview changes: the extension never touches your VS Code theme or your settings.
  5. Errors show as red squiggles in the editor with the line number, in the Problems view and at the top of the preview, where a click jumps to the line. The last good drawing stays in place until the text is fixed.
  6. Click a shape in the diagram and the editor jumps to the line where it is written.
  7. Diagrams with layers, scenarios or steps get a board list in the preview toolbar.
  8. Copy the diagram as SVG text with one click.

Common questions

Is D2 Diagram Viewer & D2 Preview free?

Yes. D2 Diagram Viewer & D2 Preview is free and MIT licensed.

How do I install D2 Diagram Viewer & D2 Preview?

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

Marketplace README snippet (copy link for VS Code Marketplace)
See full docs & install options at [vscode.zovo.one/extensions/zovo-d2-viewer/](https://vscode.zovo.one/extensions/zovo-d2-viewer/), browse all Zovo VS Code extensions at [vscode.zovo.one](https://vscode.zovo.one/), or explore [Zovo Pro](https://vscode.zovo.one/pro/).

Free. Subtitles, picture-in-picture, frame steps. MP4 viewer, MOV viewer and video player for VS Code that plays MP4, MOV, MKV, WebM and AVI with the sound VS Code mutes. AAC sound in MP4 and MOV plays with no install (built-in decoder); MKV, WebM and AVI need ffmpeg. Supports .srt and .vtt subtitle

206 installs v0.3.16 Pro

XMind viewer and mind map viewer for VS Code. Opens XMind 2020+, XMind Zen and XMind 8 files with every sheet as a tab, relationships, boundaries, summaries, markers, notes, pictures and LaTeX equations. Also opens FreeMind .mm and OPML. Search, collapse, PNG, SVG and Markdown export. Free, works of

117 installs v0.2.12 Pro
Mermaid Preview & Live Editor icon

Mermaid Preview & Live Editor

zovo.mermaid-viewer

Mermaid preview and live editor, free: edit .mmd files and mermaid blocks in Markdown with a live diagram preview side by side, completion, error lines, templates and PNG or SVG export. No sign-in, no AI, works offline. Optional Zovo Pro adds PDF, workspace and on-save export.

116 installs v0.3.15 Pro