SVG to Mermaid

Drop an SVG diagram and get editable Mermaid.js code. SVGs exported from draw.io convert exactly, because they carry the original diagram inside them.

Drop your SVG file here, or click to browse

.svg · instant · no signup required

Only have a screenshot of your diagram?

Convert an image to Mermaid with AI

Frequently asked questions

How do I convert an SVG to Mermaid?

Drop your .svg file onto the box above. The shapes, labels and connectors are read out of the file and turned into Mermaid code you can edit and re-export. No account needed.

How accurate is the conversion?

It depends on the SVG. If it was exported from draw.io with 'Include a copy of my diagram' enabled, the original diagram is stored inside the file and the conversion is exact. For any other SVG there is no underlying model to read, so the structure is reconstructed from the drawing itself: rectangles and ellipses become nodes, text inside a shape becomes its label, and arrows become connections. That works well for ordinary flowcharts and less well for heavily styled artwork.

Why does a draw.io SVG convert perfectly but another one doesn't?

An SVG is a picture, not a diagram model — normally it records where lines and boxes sit, not which box connects to which. draw.io optionally embeds the real diagram XML inside the SVG, which we detect and use directly. Without that, the connections have to be worked out from the geometry.

What kinds of SVG won't work?

SVGs that are a traced outline, a single flattened path, or an embedded bitmap have no shapes or connectors to read, and will report that no structure could be recovered. If your SVG is really a picture of a diagram, use the image converter instead — it uses AI to read the picture.

Which diagram types are supported?

Reconstructed SVGs produce flowcharts, since a drawing of boxes and arrows is a flowchart by definition. draw.io SVGs with embedded diagram data support the full range: flowcharts, class, entity-relationship, sequence and state diagrams.

Is my file uploaded or stored?

Your file is sent to our server, parsed, and returned as Mermaid code. We don't store the file itself. If you're signed in, the resulting Mermaid code is saved to your conversion history so you can find it later; if you're not signed in, nothing is kept.