Browser

drawio-to-html

Try it

Convert drawio/diagrams.net flowchart and diagram files into self-contained HTML pages with embedded SVG rendering. Use when the user uploads or mentions a .drawio file and wants to convert it to HTML, view it in a browser, or share it as a web page. Triggers on phrases like "drawio转html", "流程图转网页",

What it does

Convert drawio/diagrams.net flowchart and diagram files into self-contained HTML pages with embedded SVG rendering. Use when the user uploads or mentions a .drawio file and wants to convert it to HTML, view it in a browser, or share it as a web page. Triggers on phrases like "drawio转html", "流程图转网页", "把drawio转成html", "drawio to html".

The skill document

Drawio to HTML

Convert drawio/diagrams.net XML files into standalone HTML pages with embedded SVG.

Supported Input

  • .drawio files (diagrams.net / draw.io native format)
  • Files containing mxGraphModel XML structure

Supported Output

  • Self-contained .html files with embedded SVG
  • No external dependencies — open directly in any browser
  • Preserves original colors, shapes, rounded corners, diamonds, arrows, edge labels

Workflow

Step 1: Locate the drawio file

Get the file path from the user or workspace context.

Step 2: Run the conversion script

Execute the bundled Python script:

python3 scripts/drawio2html.py  [output.html]

If output.html is omitted, the script defaults to .html in the same directory.

Step 3: Report results

Tell the user:

  • Output file path
  • File size
  • Diagram name extracted from the XML
  • Any nodes/edges that could not be rendered (if applicable)

Node Shape Support

drawio StyleSVG Output
rounded=1 / arcSizeRounded rectangle (pill or soft rounded)
rhombusDiamond (decision nodes)
defaultRectangle with slight corner radius

Edge Support

  • Orthogonal connectors with waypoints
  • Solid and dashed lines
  • Arrow markers
  • Edge labels ("是"/"否" branch annotations)

Limitations

  • Does not render: swimlanes, images, complex gradient fills, custom shapes
  • Text inside nodes is centered; multi-line text supported
  • Only the first `` element is rendered if multiple exist

Script Reference

The conversion logic lives in scripts/drawio2html.py. It is a pure-Python script with no external dependencies beyond the standard library (xml.etree, re, sys, os).

Related skills

Generate beautiful draw.io diagrams with a mandatory visual QA loop. Covers flowcharts, ERD, architecture, sequence, and class diagrams. Use when user reques...

by Spotlight Revenue

Create and edit draw.io diagrams through the configured drawio MCP server, including flowcharts, architecture diagrams, ML model diagrams, Chinese labels, an...

54 installs

Generate beautiful draw.io diagrams with a mandatory visual QA loop. Covers flowcharts, ERD, architecture, sequence, and class diagrams. Use when user reques...

Use when creating editable technical diagrams with draw.io / diagrams.net sources, including architecture diagrams, ERD, UML, sequence diagrams, flowcharts, ML model diagrams, official shape lookup, brand symbols, Graphviz auto-layout, codebase structure maps, .drawio validation, or draw.io CLI expo

5 installs

Generate .drawio diagrams and export to PNG/SVG/PDF/JPG via the native draw.io desktop CLI.

36 installs2 stars

Create or revise standalone HTML/SVG architecture diagrams, runtime flow diagrams, sequence diagrams, and PPT-like technical visuals. Use when a user wants h...

35 installs7 stars