Convert a Mermaid diagram to Excalidraw.
Useful when a Mermaid diagram has outgrown what Mermaid's layout can render legibly.
Why convert at all
Mermaid is excellent up to about twenty or thirty nodes. Past that its layout produces crossing edges and awkward spacing, the available levers are coarse, and there is no way to attach a real icon to a node so every box looks the same. Converting hands the same graph to a full layered solver and gives the nodes real service logos, which is usually enough to make a diagram readable again.
The graph is what transfers
Mermaid's node and edge declarations map directly onto the semantic graph, so the structure comes across exactly. What does not transfer is Mermaid's own layout, because that is the thing being replaced. Direction hints and subgraphs become layout preferences and sections rather than instructions.
It is a one-way trip
There is no round trip back to Mermaid that preserves the result, because the output is a scene rather than a text description. If your requirement is that the diagram stays as text in the repository and renders on GitHub, stay in Mermaid; converting is for diagrams that have outgrown that constraint.
Fidelity
| Comes through | Does not | |
|---|---|---|
| Nodes and labels | Yes, exactly | |
| Edges and direction | Yes | |
| Edge labels | Yes | |
| Subgraphs | Become sections | Nested subgraph styling |
| Direction hints (TD, LR) | Become a layout preference | Not an instruction |
| classDef styling | Replaced by tier colouring | |
| Node shapes | Mapped where equivalent | Exotic shapes |
| Layout | Recomputed by ELK, deliberately |
The prompt
Questions
Related
- Convert Code to a DiagramThe general case: point it at code and get a diagram of what is there rather than what you remember building.
- Convert a Diagram into CodeThe direction almost nothing else does: the diagram stops being documentation and becomes the instruction.
- Convert Terraform to an Architecture DiagramTerraform records dependencies explicitly through references, so the edges are read rather than inferred. It is one of the most reliable sources there is.
- Convert SQL to an ER DiagramForeign keys already encode the relationships and their cardinality. The diagram renders what the schema is enforcing anyway.