Introduction
A DRAWIO file is a diagram saved by draw.io (also known as diagrams.net), the free diagram editor from JGraph that runs in a web browser and as a desktop app. It holds flowcharts, network diagrams, UML, org charts and similar drawings made of shapes joined by connectors.
The same diagram data can also be embedded in a PNG or SVG export, so the image can be opened and edited again in draw.io.
Structure
A DRAWIO file is XML. The root element is mxfile, with one
diagram element per page. Each page holds an mxGraphModel
whose root lists mxCell elements: every shape and connector
is a cell with an id, a parent, a style string and, for shapes, an
mxGeometry giving its position and size. Connectors name their source and
target cells.
Older files, and files saved with compression turned on, store each page's model as
deflate-compressed, Base64-encoded text inside the diagram element
instead of plain XML.
<mxfile>
<diagram name="Page-1" id="…">
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="2" value="Start" style="rounded=1;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="120" height="60" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>
Links
Software
- draw.io (web browser, Windows, macOS, Linux)
Developers
- jgraph/drawio, the editor's JavaScript source code