Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information. VS Code Integration

This unofficial extension integrates (also known as into VS Code.
Mentioned in the official blog.


  • Edit .drawio, .dio, .drawio.svg or .drawio.png files in the editor.
    • To create a new diagram, simply create an empty *.drawio, *.drawio.svg or *.drawio.png file and open it.
    • .drawio.svg are valid .svg files that can be embedded in Github readme files! No export needed.
    • .drawio.png are valid .png files! No export needed. You should use .svg though whenever possible - they look much better!
    • To convert between different formats, use the Convert To... command.
  • Uses an offline version of by default.
  • Multiple themes are available.
  • Use Liveshare to collaboratively edit a diagram with others.
  • Nodes/edges can be linked with code spans.


Like it so far? You might also like my open source Chrome extension that enhances the Github markdown editor!

Editing .drawio.svg/.drawio.png Files

You can directly edit and save .drawio.svg and .drawio.png files. These files are perfectly valid svg/png-images that contain an embedded diagram. Whenever you edit such a file, the svg/png part of that file is kept up to date.

The logo of this extension is such a .drawio.png file that has been created with the extension itself!

If diffs are important for you, you should prefer .drawio and avoid .drawio.png diagrams.

Collaboratively Edit Or Present Diagrams

With version 1.0 of this extension, extensive support for VS Code Liveshare has been added. You can now edit or present your diagrams remotely, while seeing each participant's cursor and selection! This can be used for discussing, reviewing or brainstorming diagrams. With's freehand drawing tool and integrated LaTeX support, this extension becomes an advanced whiteboard solution that can be used for remote code interviews!

Internally, this extension synchronizes diagrams with text documents. These text documents are shared by Liveshare. As Liveshare has no understanding of the text, modification conflicts might occur on simultaneous modifications.

Code Link Feature

In the status bar, you can enable or disable the code link feature. If it is enabled and you double click on a node whose label starts with #, you will perform a workspace search for a symbol matching the rest of the label.

If you have a node labeled #MyClass and a class of name MyClass, you will jump to its source if you double click the node!

Please note that you have to open at least one file of the project that contains the symbol. Otherwise, VS Code will not consider this project when searching for symbols. This file itself does not have to contain the symbol though.

Thanks to my latest github sponsors, this feature is open source and freely available now.

TIP: If you open the editor to the right side (i.e. the second editor column) and navigate to a symbol, the diagram will stay visible.


Available Themes
  • Theme "atlas"

  • Theme "Kennedy"

  • Theme "min"

  • Theme "dark"


Associate .svg Files With The Editor

By default, this extension only handles *.drawio.svg files. Add this to your VS Code settings.json file if you want to associate it with .svg files:

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

You won't be able to edit arbitrary SVG files though - only those that have been created with or this extension!

Editing the Diagram and its XML Side by Side

You can open the same *.drawio file with the editor and as xml file. They are synchronized, so you can switch between them as you like it. This is super practical if you want to use find/replace to rename text or other features of VS Code to speed up your diagram creation/edit process. Use the View: Reopen Editor With... command to toggle between the text or the editor. You can open multiple editors for the same file. This does not make much sense for SVG files though, as the diagram is stored in its metadata.


  • Henning Dieterichs, hediet on Github (Main Contributor / Author)
  • Vincent Rouillé, Speedy37 on Github

See Also / Similar Extensions

  • - This extension relies on the giant work of Their embedding feature enables this extension! This extension bundles a recent version of
  • vscode-drawio by eightHundreds.

Other Cool Extensions

If you like this extension, you might like my other extensions too: