Visual Studio Adds Native Mermaid Diagram Support with Copilot Integration
VS

Microsoft has introduced native support for Mermaid diagrams in Visual Studio’s Markdown editor, now enhanced with GitHub Copilot integration.

This update eliminates the need for third-party extensions, allowing developers to create, preview, and collaborate on diagrams directly within Visual Studio. Mermaid is a popular text-based diagramming tool that supports flowcharts, sequence diagrams, Gantt charts, class diagrams, and more—making it easier to represent complex code structures or workflows with minimal syntax.

Copilot-Powered Diagram Generation

With Copilot, developers can now generate Mermaid syntax automatically by simply asking in the chat window. For example, you can prompt:

  • “Create a sequence diagram for the API call flow.”

  • “Visualize relationships between entities in this schema.”

  • “Generate a state diagram for the lifecycle of a task.”

Copilot uses the context of your project files to return Mermaid syntax, which can be instantly previewed in the Markdown editor. The left pane shows the raw syntax, while the right pane displays the rendered diagram.

Mermaid1-1

Mermaid2

Image Courtesy: Microsoft

Key Benefits for Developers

  • No extensions required – Native support directly in Visual Studio.

  • Faster onboarding – Quickly visualize architecture and relationships for new projects.

  • Copilot-assisted workflows – Automatically generate diagrams from context.

  • Collaboration-ready – Save and share rendered diagrams or Markdown files with your team.

Try It Today

Developers can now give this feature a try in the latest Visual Studio release. Microsoft encourages users to share feedback via the Developer Community, helping shape future improvements.

To stay up to date on Visual Studio releases, tutorials, and community updates, visit the Visual Studio Hub.