Skip to content
100% local

PlantUML to Mermaid

Convert PlantUML diagram source to Mermaid syntax.

Input
Output

PlantUML to Mermaid

Paste PlantUML diagram source and this tool rewrites it as Mermaid syntax, ready to drop into a Markdown file, a GitHub README or any renderer that understands Mermaid. It handles sequence diagrams (participants, arrows, activation bars, notes, loops and alt/else blocks), class diagrams (classes, interfaces, attributes, methods, inheritance and associations), state diagrams (transitions, composite states, notes) and simple activity flowcharts (start/stop, actions and if/else branches).

Diagram type can be detected automatically from the source, or set manually with the Diagram type option when the guess is wrong. Graph direction controls whether class and state diagrams read top-to-bottom, left-to-right or another orientation, and flowcharts render the same way. Keep notes carries PlantUML notes over as Mermaid notes instead of dropping them, and Rewrite spaced names to safe identifiers turns names like "Alice Liddell" into a clean identifier with the original text kept as a display alias, so the diagram still renders correctly.

Not every PlantUML construct has a direct Mermaid equivalent. Rather than silently dropping what it cannot translate, the converter turns an unrecognized line into a Mermaid comment at the same position, so nothing from the original source disappears — turn off Report unsupported lines to drop those lines instead of commenting them out. Wrap output in a mermaid code block adds the triple-backtick fence Markdown renderers expect.

Conversion runs entirely in your browser using plain JavaScript — your diagram source is never uploaded anywhere. Copy the Mermaid output, download it as a .txt file, or send it straight to another tool's input to keep working on it.

FAQ

Which PlantUML diagram types are supported?
Sequence, class, state and simple activity (flowchart) diagrams. Other diagram types are converted line by line where the syntax overlaps, with anything unrecognized kept as a comment.
What happens to a construct the tool cannot convert?
It is written into the Mermaid output as a comment starting with "%% unsupported:" so you can see and fix it by hand, unless you turn off Report unsupported lines, in which case it is dropped instead.
How does automatic diagram-type detection work?
The tool scores the source against the syntax patterns typical of each diagram type — participant declarations and arrows for sequence, class blocks and inheritance arrows for class, and so on — and picks the best match. Override it with the Diagram type option when it guesses wrong.
Does the output match Mermaid syntax exactly?
It follows current Mermaid syntax for the constructs it converts. Very unusual PlantUML formatting or rarely used keywords may need a manual touch-up after conversion.
Is my diagram source uploaded anywhere?
No. The conversion runs entirely in your browser — your PlantUML source never leaves your device.