Convert

Convert a Mermaid diagram to Excalidraw.

Useful when a Mermaid diagram has outgrown what Mermaid's layout can render legibly.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

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 throughDoes not
Nodes and labelsYes, exactly
Edges and directionYes
Edge labelsYes
SubgraphsBecome sectionsNested subgraph styling
Direction hints (TD, LR)Become a layout preferenceNot an instruction
classDef stylingReplaced by tier colouring
Node shapesMapped where equivalentExotic shapes
LayoutRecomputed by ELK, deliberately

The prompt

shell
$ Convert this Mermaid diagram into a canvas diagram, grouping the nodes into tiers and using real service icons.
FAQ

Questions

Can it convert Mermaid sequence diagrams too?

Yes, along with flowcharts and ER diagrams. Flowcharts and architecture diagrams are the ones that benefit most, since they are where Mermaid's layout struggles first.

Can it go back to Mermaid?

The agent will write Mermaid from the current graph if you ask, so the structure survives. The computed layout does not, because Mermaid has no way to express it.

Should I convert everything?

No. A small Mermaid diagram in a README that renders on GitHub is doing its job perfectly. Convert when the diagram has stopped being readable.

Related