Structurizr DSL
Convert from Structurizr DSLto any other format
Structurizr DSL is a text-based domain-specific language for describing software architecture models "as code," created by Simon Brown as part of the Structurizr toolset and closely tied to his C4 model. Rather than drawing boxes and lines directly, an author writes a plain-text .dsl file (conventionally workspace.dsl) that defines a single model of a system, from which multiple diagrams are generated. It is thus a modeling language whose primary output is a set of consistent architecture views, and it treats the model as a versionable artifact that lives alongside source code in Git.
The language is organized around a top-level workspace block containing two main sections: a model and a set of views. The model declares named elements in a hierarchy that mirrors C4 abstraction levels: person, softwareSystem, container (an application or data store within a system), and component (a grouping of code inside a container), plus deployment constructs such as deploymentEnvironment and deploymentNode. Elements are connected by directed relationships written with an arrow syntax (user -> system "Uses"), so the underlying structure is a labeled, tagged directed graph of architecture entities. The views section then defines which slice of that graph to render, one per view type, systemContext, container, component, dynamic, deployment, filtered, and so on, with include/exclude filters, autoLayout directives, tags, and styling. Additional keywords like !include, !identifiers, and !docs support file composition and attaching Markdown/AsciiDoc documentation and Architecture Decision Records.
In the graph-data and format-conversion landscape, Structurizr occupies a niche adjacent to other diagram-as-code languages such as PlantUML, Mermaid, and D2, but differs in that a single semantic model drives many diagrams rather than each diagram being drawn independently. The open-source Structurizr CLI (used via Structurizr CLI and the CLI) parses the DSL into a canonical JSON workspace and can export to PlantUML, Mermaid, WebSequenceDiagrams, DOT, and image formats; layout is handled by Dagre (older versions also offered Graphviz).
Its strengths are model consistency, diff-friendly text, and strong C4 alignment. Limitations include a scope deliberately confined to C4-style architecture (not a general graph or UML tool), historically weak automatic layout that often needs manual positioning, and a licensing shift toward an open-core model for on-premises features while the CLI and Lite remain free.
Alternative Names: Structurizr DSL
| Feature | Structurizr DSL (C4 model) |
|---|---|
| Nodes | |
| Directed Edges | |
| Parallel Edges | |
| Self-loops | |
| Nested Graphs in Nodes | |
| Node Labels | |
| Edge Labels | |
| Attributes on Nodes | |
Read-only Tools
Frequently Asked Questions
What is a Structurizr DSL (C4 model) file?
A Structurizr DSL (C4 model) file stores a graph — its nodes, edges and attributes — in the Structurizr DSL (C4 model) format (also: Structurizr DSL). See the feature table above for what it supports.
How do I open a Structurizr DSL (C4 model) file?
Open it in a graph tool that supports Structurizr DSL (C4 model), or convert it to a format your tool reads. With GraphInOut you can convert Structurizr DSL (C4 model) to GraphML, DOT, Connected JSON and more, right in your browser.
How do I convert a Structurizr DSL (C4 model) file to another format?
Use the Convert from Structurizr DSL (C4 model) link above: upload or paste your Structurizr DSL (C4 model) file (input preset to Structurizr DSL (C4 model)), choose a target format and download the result — free, no install.
