TOOL

convert2mermaid

convert2mermaid is an open-source command-line tool that converts diagrams authored in other diagramming formats into Mermaid syntax. It is written by Justin Greywolf (GitHub jgreywolf), a longtime contributor to the Mermaid project and former engineer at Mermaid Chart, and is distributed as a TypeScript/Node.js package on GitHub. The tool reads a source diagram and emits a text-based Mermaid definition, either as a bare .mmd file or wrapped in a fenced code block inside a Markdown document, so that diagrams can live in version control alongside code rather than as opaque binary files.

It accepts four input formats: Visio (.vsdx), draw.io / diagrams.net (.drawio), Excalidraw (.excalidraw), and PlantUML (.puml, .plantuml). Of these, only PlantUML overlaps with the graphinout catalog as PlantUML; the others are general drawing/whiteboard formats rather than graph-data serializations. Coverage varies by source: draw.io is the most complete (flowchart, class, sequence, state, component, ER, and network diagrams), while PlantUML supports class, component, state, use-case, sequence, activity, and Gantt diagrams, and Visio/Excalidraw are limited to flowcharts and basic shapes. On the output side it targets Mermaid diagram types including flowchart, classDiagram, stateDiagram-v2, and block-beta.

Architecturally the project is modular: format-specific parsers (draw.io XML via xml2js, PlantUML text, Excalidraw JSON, Visio via vsdx-js) feed a set of Mermaid generators, coordinated by a detection engine that guesses the diagram type with a confidence score and maps roughly fifty shape types, attempting to preserve colors, line styles, and arrow types. Invocation is straightforward, e.g. node ./dist/index.js -i input-diagram.drawio -o output.mmd, with the output filename auto-derived if omitted. As of version 2.0.0 (October 2025) it ships with a Vitest suite of 50-plus tests.

Because it emits Mermaid, convert2mermaid sits in the same drawing-to-text niche as tools that go the other direction, such as mermaid2dot and dot2mermaid, and complements Mermaid-oriented renderers like Kroki. Its documented limitations are honest: it processes a single diagram per file with no multi-page support, PlantUML use-case diagrams can be misdetected as sequence diagrams, Gantt handling is basic, and deeply nested structures may need manual cleanup. It is a focused conversion utility rather than a general graph-interchange engine, and its fidelity is best treated as a strong starting draft that a human refines.

Input Formats

Output Formats

Frequently Asked Questions

What graph file formats does convert2mermaid support?

See the list on this page — it shows every format convert2mermaid can read, write and display.

How do I import a graph into convert2mermaid?

Convert your file to a format convert2mermaid can read, then open it in convert2mermaid. Use GraphInOut to get a convert2mermaid-compatible file in seconds.

How do I convert a file so convert2mermaid can open it?

Use the convert links above — upload or paste your graph, pick a format convert2mermaid accepts and download the result, right in your browser.