What "open source" actually means here
Plenty of network diagram software is free to download. Far less of it is open source: published under a licence that lets you read the code, run it anywhere, change it and keep using it if the company behind it changes its mind. For network documentation that matters more than it sounds. Your drawings will outlive the laptop they were made on, and probably the job of whoever made them. A file format nobody can open in five years is a liability.
This page compares the open-source options network engineers actually use, says what each does well and badly, and is honest about where our own free tool fits. Two families matter:
- Drawing tools, where a person places every shape. Flexible, and only as current as the last person who opened the file.
- Data-driven tools, where the drawing is generated from a source: a text file, a script, or an inventory like NetBox. Less freedom, but a drawing you can rebuild on demand.
draw.io / diagrams.net
draw.io, also served as diagrams.net, is the default answer, and deservedly. It is Apache-2.0 licensed, runs in the browser or as a desktop app on Windows, macOS and Linux, and stores files wherever you like, including locally with no account at all. Its shape libraries cover Cisco, Fortinet, Juniper, generic network gear, racks and the major clouds.
What draw.io does better than anything else on this page: freedom. You can draw any layout, annotate it, add a floor plan underneath and export to PNG, SVG, PDF or Visio's VSDX. Most engineers who leave Visio land here.
What it doesn't do: know anything about your network. Every IP, hostname and cable label is typed by hand, so the drawing is correct on the day it is finished and drifts from then on. Its CSV import can generate shapes from a spreadsheet, but you write and maintain that mapping yourself.
NetBox plus plugins
NetBox is not a drawing tool. It is an open-source (Apache-2.0) source of truth for networks: sites, racks, devices, cables, VLANs, prefixes and IP addresses. It still draws two things well on its own: rack elevations, front and rear, from each device's rack position, and cable traces, the path from one interface to the far end through patch panels.
For whole-network pictures there are community plugins. The best known, netbox-topology-views (Apache-2.0), draws an interactive graph of devices and the cables between them inside NetBox, filtered by site, role or tag, and can export to PNG or to XML for draw.io.
What NetBox does better: the data is right, because it is the record. What it doesn't do: produce a drawing you would hand to an auditor. A force-directed graph of every cable answers "what is plugged into what". It doesn't show security zones as zones, VLAN tables per zone, or the one page a plant manager reads.
Graphviz and diagrams as code
Diagrams as code means writing a text description and letting a layout engine place the shapes. The options:
- Graphviz (Eclipse Public License) is the engine underneath much of this world. You write nodes and edges in its DOT language and it computes the layout. Excellent for generated graphs; hard to bend into a specific house style.
- Diagrams (MIT) is a Python library that draws architecture diagrams with vendor icons, rendered through Graphviz. Popular for cloud diagrams.
- Mermaid (MIT) renders diagrams from Markdown-like text, and GitHub, GitLab and many wikis render it inline. Good for small flow and sequence diagrams next to the code.
- D2 (MPL-2.0) is a newer diagram language with better-looking default layouts and containers that suit zones.
What diagrams as code does better: version control. The diagram lives in Git, every change is a reviewable diff, and a script can write the text from any data source. What it doesn't do: stay readable at network scale. Auto-layout engines place forty switches wherever the algorithm likes, and the layout shifts every time a node is added, so last month's drawing and this month's can't be laid side by side.
Where the free NetDiagrams tool fits
NetDiagrams is our own tool, so weigh this section accordingly. It is Apache-2.0 licensed, pure Python with no dependencies, and it sits between the two families: the data comes from NetBox, but the layout comes from a fixed draw.io template rather than an auto-layout engine.
It reads NetBox with a read-only API token and writes a set of draw.io sheets per site: overview by security zone, logical page with a VLAN table per zone, physical page with cable labels, hardware and optics, wireless, flows, failover and multi-site WAN. Each industry has its own template; the manufacturing one lays the plant out by Purdue level with an industrial DMZ. Every shape links back to its NetBox record, and a drift report lists where NetBox and the template disagree.
Where it is weaker: it needs NetBox, and it needs your NetBox to record zones (as tags or custom fields), which takes setup. Its layout is the template's, so if you want a free-form drawing, draw.io on its own is the better tool. It doesn't discover devices or scan the network; it draws what NetBox says.
Comparison table
| Tool | Licence | NetBox import | Purdue / zone layout | Export formats |
|---|---|---|---|---|
| draw.io / diagrams.net | Apache-2.0 | No (CSV import you configure) | By hand | .drawio, PNG, SVG, PDF, VSDX |
| NetBox (built in) | Apache-2.0 | It is the source | No; rack elevations and cable traces only | SVG rack elevations |
| netbox-topology-views | Apache-2.0 | Native (NetBox plugin) | No; interactive graph | PNG, draw.io XML |
| Graphviz | EPL | Via your own script | Clusters, by hand in DOT | SVG, PNG, PDF |
| Diagrams (Python) | MIT | Via your own script | By hand in code | PNG, SVG, PDF |
| Mermaid | MIT | Via your own script | Subgraphs, limited | SVG, PNG |
| D2 | MPL-2.0 | Via your own script | Containers, by hand | SVG, PNG, PDF |
| NetDiagrams | Apache-2.0 | Yes, read-only API | Yes, from zone tags; Purdue in the manufacturing template | .drawio (then anything draw.io exports) |
Free but not open source, and so left out of the table: yEd and the free tiers of commercial diagram services.
Which one to pick
- You have no inventory and need one drawing this week: draw.io. Start from the network diagram examples and the rules on the network diagram tips page so the drawing has zones, labels and a date.
- You want diagrams in Git next to your automation: D2 or Mermaid for small diagrams, Graphviz or Diagrams when a script generates them.
- You already keep the network in NetBox: use its rack elevations and cable traces as they are, add netbox-topology-views for an interactive picture, and use NetDiagrams when you need the drawing set itself: zones, VLAN tables and a drift report.
- You are about to start documenting: collect into the network documentation template, whose columns import straight into NetBox, so you only type the data once.
Whatever you pick, the drawing is only as good as its method: one page per audience, every VLAN in exactly one zone, and a date in the title block. To see that method applied to a real site type, read the free warehouse network segmentation chapter, or pick the field guide for your industry from Network Diagrams by Industry.









