Open-source project
hediet/vscode-drawio avatar
hediet/vscode-drawio

hediet/vscode-drawio: editing .drawio.svg and .drawio.png files without leaving VS Code

This unofficial extension integrates Draw.io (also known as diagrams.net) into VS Code.

9,515 stars470 forksTypeScriptGPL-3.0

At a glance

What is it?
An unofficial VS Code extension that embeds an offline Draw.io editor for .drawio, .dio, .drawio.svg and .drawio.png files, plus a code-link feature that jumps from a labelled node to the matching symbol.
Who is it for?
Adopt it if your diagrams live in the repository and you want .drawio.svg files that render on GitHub without an export step. Skip it if you need a stable diff on every diagram commit, since .drawio.png diffs poorly and the README says to prefer .drawio for diffs, or if you depend on the inline Markdown editor, which the README marks experimental and Insiders-only.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 9 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • hediet/vscode-drawio9,515 ★ · +24
Star history
Repository2026-09-222026-11-15
hediet/vscode-drawio9.5k9.5k

24 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What hediet/vscode-drawio solves, and for whom

Diagram files usually live outside the editor. You draw in a browser tab, export a PNG, commit the PNG, and the source diagram drifts from the picture in the README. This extension removes the export step for two formats. A .drawio.svg file is a valid SVG that carries an embedded Draw.io diagram, and a .drawio.png file is a valid PNG that does the same. Both can be embedded in a GitHub readme directly, and whenever you edit one, the SVG or PNG part is kept up to date.

The audience is narrow and specific: engineers who keep architecture diagrams in the same repository as the code and want them reviewed in the same pull request. The README also mentions freehand drawing and LaTeX support, which makes the extension usable as a whiteboard for remote code interviews. That is a secondary use case, not the reason the project exists.

One caveat sits in the README itself: if diffs matter to you, prefer .drawio and avoid .drawio.png diagrams. A binary PNG produces an unreadable diff, so the format that looks best in a readme is the format that reviews worst.

How the editor, the text document and Liveshare fit together

The extension registers two custom editors. The view type hediet.vscode-drawio, labelled "Draw.io (Binary)", handles *.drawio.png and *.dio.png. The view type hediet.vscode-drawio-text, labelled "Draw.io", handles *.drawio, *.dio, *.dio.svg and *.drawio.svg. The language contribution lists extensions .drawio, .dio, .dio.svg, .drawio.svg, .drawio.png and .dio.png, so file association is declared rather than inferred.

Internally, the README states that the extension synchronises Draw.io diagrams with text documents, and that Liveshare shares those text documents. That is the whole collaboration mechanism: Liveshare has no understanding of the text, so the README warns that modification conflicts might occur on simultaneous modifications. Two people editing the same node at the same moment is the failure case, not a theoretical one.

Installing it and opening your first .drawio.svg

The extension is published on the VS Code Marketplace under the identifier hediet.vscode-drawio, which is the homepage listed for the repository. Installation is the normal Marketplace flow.

After that, the README says to create an empty file with one of the supported extensions and open it. The editor opens with the bundled offline Draw.io build, so no network access to app.diagrams.net is required.

Draw a shape, save, and the file remains a valid SVG with the diagram embedded. To move a diagram between formats, the README points at a single command, `Draw.io: Convert To...`, which handles the conversion rather than requiring a manual export.

The extension declares limited support for untrusted workspaces: in Restricted Mode, workspace settings cannot load custom libraries or plugins, or change which Draw.io app the editor loads. Dynamic providers, however, only run in trusted workspaces, which matters for the Markdown integration described below.

The code link feature and what it does not do

In the status bar you can toggle the code link feature. When it is on and you double click a node whose label starts with #, the extension runs a workspace search for a symbol matching the rest of the label. A node labelled #MyClass jumps to the source of MyClass.

The README is explicit about the precondition: you have to open at least one file of the project that contains the symbol, otherwise VS Code will not consider that project when searching for symbols. The open file does not itself have to contain the symbol. This is a VS Code workspace-search constraint rather than an extension bug, and it is the reason the feature appears broken in a freshly cloned repository where nothing is open yet.

The README offers a layout tip that is worth taking literally: open the Draw.io editor in the second editor column and navigate to a symbol, and the diagram stays visible while you read the code. That is the entire value of the feature, and it only works if you arrange the editors that way.

Inline diagrams in the Markdown editor are experimental and Insiders-only

VS Code Insiders ships an experimental WYSIWYG Markdown editor, reachable through `View: Reopen Editor With... > Markdown Editor`. In that editor, a fenced code block tagged drawio is replaced by a live, resizable Draw.io editor, and edits are written back into the fenced block so the Markdown file stays the single source of truth.

The README gives this example of the fenced block, and the same fence accepts block attributes: locked makes a block read-only and height=N fixes its height, for example a fence opened with `drawio locked height=300`. The Markdown editor's own lock toggle also puts diagrams into read-only mode.

The limitations are stacked and the README does not soften them. The contribution point is experimental and exists only in Insiders builds; in stable VS Code and in the regular Markdown preview the fence is shown as text or handled by the preview plugin as before. Dynamic providers only run in trusted workspaces. Settings baked into the editor, including theme, appearance, custom libraries and fonts, apply the next time the Markdown editor is opened rather than immediately. And Draw.io plugins are not loaded into the inline editors at all. If you need a plugin, the inline path is closed to you.

Themes, SVG association and the settings that change behaviour

The bundled editor ships several Draw.io themes, listed in the README as atlas, Kennedy, min and dark. By default .drawio.svg files are saved with light colours whatever theme the editor uses; setting hediet.vscode-drawio.svgAppearance to auto makes them adapt to the page's colour scheme, and dark always saves them with dark colours.

By default the extension only handles *.drawio.svg, not arbitrary .svg. To associate plain .svg files with the Draw.io editor you add this to settings.json:

json
"workbench.editorAssociations": {
    "*.svg": "hediet.vscode-drawio-text",
}

The README immediately narrows the consequence: you will not be able to edit arbitrary SVG files, only those created with Draw.io or this extension. Pointing this association at a hand-written icon set turns those files into files the extension cannot meaningfully open. The same view type, hediet.vscode-drawio-text, is the one declared for *.drawio and *.dio, so the association reuses the text-backed editor rather than the binary one.

Where this extension is the wrong tool

Diff quality is the first boundary. The README says plainly that if diffs are important you should prefer .drawio and avoid .drawio.png. A team that reviews diagrams as part of code review and standardises on .drawio.png has chosen the format with the worst review story.

Simultaneous editing is the second. Liveshare support syncs text documents, and the README states that Liveshare has no understanding of that text, so modification conflicts might occur on simultaneous modifications. This is fine for presenting and discussing, which is what the README recommends it for, and risky for two people dragging shapes at once.

Portability is the third. The extension bundles a recent version of Draw.io rather than calling app.diagrams.net, which is what makes offline editing work, but it also means the editor version is tied to the extension version. The manifest does list hediet.vscode-drawio.plugins, hediet.vscode-drawio.offline and hediet.vscode-drawio.online-url settings, which workspace settings cannot change in Restricted Mode.

Finally, the inline Markdown editor is not a reason to adopt this extension today. It is experimental, Insiders-only, and unavailable in stable VS Code.

The alternative already named in the README

The main alternative is not an extension at all. Draw.io itself, at app.diagrams.net, is the upstream project this extension depends on. Editing in the browser and committing the exported file is the workflow this extension replaces. For a repository where diagrams are rarely touched and never reviewed, that workflow is simpler, because it involves no extension, no file association, and no editor view types to reason about.

Maintenance, licence and upgrade cost

The repository is not archived, and its last push was on 2026-10-30. The package manifest reports version 1.18.0 and preRelease false, and it requires VS Code ^1.70.0, so the extension targets a VS Code range rather than only the newest release. The repository carries a CHANGELOG.md at the top level, which is where release-level changes are recorded; the repository has no published releases, so the changelog is the file to read before upgrading.

The licence is GPL-3.0, declared in both the repository LICENSE.md and the package manifest's license field. That is a copyleft licence, and it is worth stating the practical implication without giving legal advice: if you fork the extension or ship a modified build, the GPL-3.0 obligations attach to that distribution. Using the published extension as-is is a different situation from redistributing a modified one, and the boundary is a question for your own legal review.

Upgrade cost is low by design. The extension bundles Draw.io, so a new extension version can bring a new Draw.io version with it, and the README notes that settings baked into the editor apply the next time the Markdown editor is opened. The upgrade risk sits in the experimental Markdown integration, which depends on a contribution point that only exists in Insiders builds.

Editorial conclusion

Adopt it if your diagrams live in the repository and you want .drawio.svg files that render on GitHub without an export step. Skip it if you need a stable diff on every diagram commit, since .drawio.png diffs poorly and the README says to prefer .drawio for diffs, or if you depend on the inline Markdown editor, which the README marks experimental and Insiders-only. Before rolling it out, verify the workbench.editorAssociations behaviour on a real .svg file and confirm which Draw.io theme you want, because the theme is baked into the editor and applies the next time the Markdown editor is opened.

Frequently asked questions

Is there a Draw.io plugin for VS Code?

Yes. hediet/vscode-drawio is an unofficial extension that integrates Draw.io, also known as diagrams.net, into VS Code, and it is published on the VS Code Marketplace. The README notes it was mentioned in the official diagrams.net blog.

How do I open a Draw.io file in VS Code?

Create an empty file with a supported extension such as .drawio, .drawio.svg or .drawio.png and open it, and the Draw.io editor opens with the bundled offline version. The README gives exactly this instruction for creating a new diagram.

What is draw.io now called?

The README refers to it as Draw.io, also known as diagrams.net, and links to both app.diagrams.net and diagrams.net. The extension's own description uses the name Draw.io.

How do I install the vscode-drawio extension from a VSIX file?

The repository's listed homepage is the VS Code Marketplace page for hediet.vscode-drawio, and that is the install route the project links to.

Official sources

  1. hediet/vscode-drawio on GitHub
  2. Issues
  3. License: GPL-3.0
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/hediet-vscode-drawio.svg)](https://hysenlabs.com/projects/hediet-vscode-drawio)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/hediet-vscode-drawio.svg)](https://hysenlabs.com/projects/hediet-vscode-drawio)

Was this useful?