Skip to content

Free tool

Structurizr DSL to C4 model diagram

Paste a Structurizr DSL workspace or a workspace JSON export and see its C4 model views as diagrams you can edit: people, software systems, containers, components and deployment nodes, with relationships labeled by their description. Pick a view, or open them all as separate diagrams.

Example output

Example diagram drawn from a Structurizr sample
Try an exampleOnline banking (DSL)Parcel tracker (JSON)

How it works

  1. Paste or drop your workspace

    A workspace.dsl file, DSL copied from the Structurizr playground, or the JSON that Structurizr exports. The model and views blocks are read, styles can stay in the text.

  2. See each C4 view

    Every view in the workspace is listed, from the system landscape down to components and deployment. Choose one and the preview redraws it with C4 cards, boundaries and labeled arrows.

  3. Open it in Archboard

    Save the view as a new diagram to rearrange, annotate, share a link, or export SVG and PNG. Signing up takes a Google or GitHub account.

What’s drawn from a Structurizr workspace

The selected view is built from these parts of the model:

  • person

    People as C4 person cards with their description. A person tagged External, or with location External in a JSON export, becomes an external person.

  • softwareSystem

    Software systems as C4 system cards with their description. Systems tagged External become external system cards, which show the name only.

  • container

    Containers as cards with their technology and description. A container tagged Database becomes a database card, which shows the name only. A container tagged Queue, containers and components tagged External, and an enterprise block are drawn with their own C4 types: a queue container, external container and component cards, and an enterprise boundary.

  • component

    Components as cards with their technology, inside the container they belong to.

  • ->

    Relationships as arrows labeled with their description, followed by the technology in square brackets. When a view shows only the parents, a relationship between their children is drawn between the parents, once.

  • container bankingcomponent banking.api

    The scope of a container or component view as a frame: the software system in a container view, the container in a component view.

  • group

    Groups as frames around the people, systems or containers they hold. An empty group is left out.

  • deploymentNodeinfrastructureNodecontainerInstance

    Deployment views with nested deployment nodes as frames, container and software system instances as the cards they stand for, and infrastructure nodes as deployment node cards.

  • systemLandscapesystemContextdeployment

    System landscape, system context, container, component and deployment views, each one a separate diagram. A workspace without views gets a landscape, a context view per system and a container view per system that has containers.

  • autoLayout lrinclude *

    include * with the meaning it has in each view type, include and exclude lists of identifiers, and the direction of autoLayout, top to bottom when none is set.

One workspace, many views

A workspace usually holds several views of the same model. The first view in the file is drawn first, and a view picker above the preview switches to any other view of the same text. To keep every view, Open all views creates one diagram per view in your workspace, the selected view first. On Free, views that don’t fit your diagram limit aren’t dropped: the tool tells you how many were opened and how many are left.

What a Structurizr import leaves out

  • Files and scripts the workspace points to: !include, !docs, !adrs, !script, !plugin and workspace extends aren’t followed or run. They are counted in a warning, and everything written in the pasted text is still drawn.
  • Element and relationship styles, themes and branding. Shapes, colors and icons come from the C4 cards, and you can restyle them once the diagram is open in Archboard.
  • Dynamic, filtered, custom and image views, and include or exclude rules written as expressions. These are skipped and counted, and the other views are still listed.
  • Element positions saved in a JSON export. Each view is laid out again automatically, because Structurizr sizes don’t match the C4 cards.
  • Documentation sections, decision records, properties, perspectives and URLs. Only the model and its views are read.

Structurizr questions

Which C4 levels can I draw from Structurizr DSL?

Every level a Structurizr workspace models: system context and system landscape views for level 1, container views for level 2 and component views for level 3, plus deployment views. Code level diagrams aren’t part of a Structurizr workspace, so there is nothing to draw for them.

Can I paste a workspace JSON export instead of DSL?

Yes. The JSON that Structurizr saves or exports reads the same way: the elements and relationships listed in each view are drawn, people, systems, containers and deployment nodes included. Saved positions are ignored and every view gets a fresh automatic layout.

Can I open every view at once?

Yes. When a workspace has two or more views, Open all views creates a separate diagram for each one, starting with the view you selected. If your plan’s diagram limit stops it early, the views already opened stay, and the rest are counted so nothing is lost without notice.

My workspace uses !include. What should I do?

Paste the included files into the same text box, in place of their !include lines. The directive is counted in a warning instead of being followed, because only the text you give the tool is read.

What’s saved when I open the diagram in Archboard?

The preview isn’t saved. When you select Open in Archboard, the view you see, with its C4 cards, boundaries, frames and labeled arrows, is saved as a new diagram in your workspace. Later edits to the DSL or JSON don’t update it.

Is the Structurizr to diagram tool free?

Yes. Pasting a workspace and viewing its diagrams need no account. Opening a view, or all of them, in Archboard needs a free account.

Open a canvas in a minute

Sign in with Google or GitHub. Free for a single seat. Upgrade when the team joins.