pu2mm
Convert from any graph formatto pu2mm Convert from pu2mmto any other format
pu2mm is a small, single-purpose converter that translates PlantUML sequence diagrams into the equivalent Mermaid sequence-diagram syntax. It was written by Olivier Potonniee (GitHub user opoto) and is published under the Apache-2.0 license. Despite the "mm" in its name standing for Mermaid rather than "mind map," the tool operates purely on the textual sequence-diagram dialects of PlantUML and Mermaid; it does not touch class, activity, state, or actual PlantUML mind-map diagrams. The whole application is client-side JavaScript (with a little HTML and CSS) and runs as a static web page hosted at opoto.github.io/pu2mm, where a user pastes PlantUML source, converts it, and immediately previews the rendered Mermaid output via the bundled mermaid.js library.
Internally pu2mm is not a real parser but a sequence of regular-expression rewrites applied line by line. It swaps the @startuml/@enduml wrapper for Mermaid's sequenceDiagram header, normalizes participant declarations (mapping PlantUML's boundary, control, entity, database, collections, and queue lifelines all onto participant, and stripping color and order modifiers Mermaid cannot express), and rewrites arrow glyphs so that PlantUML's ->, -->, ->> and reverse/back arrows become Mermaid's ->>, -->>, and async ) forms, forcing every message left-to-right. It also collects declared and undeclared participants to compute the first and last lifeline, which it needs when emitting spanning notes. Notes (left/right/over, single- and multi-line, and ref blocks) are recognized and reformatted, comments are converted from ' to %%, and autonumber parameters are dropped.
Constructs Mermaid lacks are approximated or annotated rather than dropped silently. group blocks become a shaded rect with a spanning note, dividers (==label==), delays (...), and title lines are turned into notes over the participants, and destroy is mapped to deactivate. Genuinely unsupported directives such as header, footer, skinparam, and newpage are commented out and flagged with a %% [TBD] marker so the author can see what was skipped.
In the broader graph-data and diagram-conversion landscape, pu2mm sits alongside other diagram-syntax translators like convert2mermaid, dot2mermaid, and mermaid2dot, and complements general-purpose renderers such as Kroki that accept both notations. Its strengths are transparency, zero installation, and instant visual feedback; its weaknesses follow directly from the regex approach: it handles only "simple" sequence diagrams, cannot cope with the full PlantUML grammar (nested alt/opt/loop/par groups, activation +/- shorthand, and preprocessor features are incompletely or not handled), and offers no command-line or programmatic API for batch use.
Input Formats
Output Formats
Frequently Asked Questions
What graph file formats does pu2mm support?
See the list on this page — it lists every format pu2mm can read, write and display.
How do I import a graph into pu2mm?
Click on Convert from any graph format to pu2mm. Then just paste, upload or drag and drop your source data.