Formats & Conversion
Mermaid, D2, Excalidraw, Draw.io, PlantUML and Visio: how each is edited and how diagrams convert between them.
Archgram edits several diagram languages side by side and converts between them through a neutral graph model, so you are never locked into the first format you picked.
Supported Formats
| Format | How you edit it | Availability |
|---|---|---|
| Mermaid | Code pane with autocomplete and colour swatches; click nodes and arrows in the preview; Visual edit form for flowcharts. | On by default |
| D2 | Code pane with autocomplete; Visual edit form. Rendered in the browser (WebAssembly). | On by default |
| Excalidraw | Draw on the canvas; the code pane shows the scene JSON and stays in sync. | On by default |
| Draw.io | The full diagrams.net editor embedded in the page, plus the XML in the code pane. | Settings → Experimental |
| PlantUML | Code pane and Visual edit form; structural diagrams are drawn locally. | Settings → Experimental |
| Visio (.vsdx) | Not an editing language: opens into, and exports from, any of the above. | Import free · export Pro |
AI generate, refine and restyle work in every format. For Excalidraw and Draw.io the AI edits a Mermaid round trip of your drawing, so manual positions are re-laid-out afterwards.
Switching Format
Use the language bar above the editor. If the diagram is still the starter sample, you simply get the starter for the new format. Otherwise Archgram converts your diagram and shows a preview with a list of warnings — anything the target format cannot express — before you accept it. Nothing changes until you confirm, and the switch is recorded in the version history so you can step back.
What Converts
- Flowcharts and box-and-arrow diagrams convert between every format. Groups (subgraphs, containers), labels, shapes, arrow ends, line styles and colours are carried across.
- Sequence, class and ER diagrams convert natively between Mermaid, D2 and PlantUML (lifelines, messages, members, attributes, keys and cardinalities survive). Toward Excalidraw, Draw.io and Visio they become boxes with text, with a warning.
- State, Gantt, C4, pie, mindmap and other Mermaid types cannot be converted. They still render, save, share and export as SVG, PNG or Markdown.
Positions are kept when the source has them (Excalidraw, Draw.io, Visio) and re-laid-out with a Dagre layout otherwise.
D2
direction: right
client: Client { shape: person }
api: API Gateway
db: PostgreSQL { shape: cylinder }
client -> api: HTTPS
api -> db: SQLD2 supports shape: sequence_diagram, shape: class and shape: sql_table, which map to sequence, class and ER diagrams when you convert. The first D2 render downloads the WebAssembly engine (a few MB), so it may take a moment.
Excalidraw
The canvas is the preview; edits are written to the scene JSON and valid JSON typed in the code pane is pushed back into the canvas. Pasted images are uploaded to storage so the saved scene stays small, and a banner warns when a scene grows past about 1.5 MB.
Draw.io and PlantUML
Turn both on under Settings → Experimental Features. Draw.io opens the embedded diagrams.net editor and reads .drawio and .dio files, plain or compressed. PlantUML renders component, deployment, use-case and class-box diagrams locally; other PlantUML diagram types need a PlantUML server configured by whoever runs your Archgram instance.
Visio
Import file… in the Export menu opens a .vsdx file and converts its pages, shapes and connectors into the format you are editing. Export Visio (.vsdx) (Pro) writes a real Visio package from any editable format.