Edit the diagram XML

Edit the diagram XML

Underneath the canvas is draw.io XML, and you can edit it directly. That makes bulk changes trivial: rename thirty shapes, restyle everything, or fix something the UI makes awkward.

It is also how you paste in a diagram somebody sent you as XML.

image-20260907-082241.png
Click Extras → Edit Diagram
Screenshot 2026-09-07 at 09.22.50.png
Paste in the Draw.io XML file

What this is for

  • Bulk edits that would take a hundred clicks.

  • Pasting in a diagram supplied as XML.

  • Debugging a diagram that behaves oddly.


How it works

Action

How

Action

How

Open the XML

Extras, Edit Diagram.

Replace the diagram

Paste new XML over the existing content and confirm.

Edit one shape's style

Ctrl+E with the shape selected, which is a smaller version of the same idea.

Cancel

Close without confirming; nothing is applied.


A few things that catch people out

  • Invalid XML is rejected rather than applied, so the worst case is that nothing happens.

  • Take a copy before a large hand edit. The undo history does not always survive a full replace.

  • The XML is standard draw.io, so it opens anywhere else too. See Reference.


Related

extension

The canvas rewards ten minutes of learning.

extension
extension