---
title: Mermaid View – C4 Diagram Read-Only Rendering | Nodinite C4 Diagrams
description: The Mermaid View renders any Nodinite C4 diagram as read-only Mermaid C4 markup, such as C4Container or C4Context. Learn how to read, share, and embed the current diagram as Mermaid output.
---

# <i class="fal fa-eye" aria-hidden="true"></i> Mermaid View

Every diagram in [C4 Diagrams][What is C4 Diagrams] has a **Mermaid View** — a read-only rendering of the diagram as valid [Mermaid](https://mermaid.js.org/)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup> C4 markup. The Mermaid View is independent of the [C4 Designer][C4 Designer]: it gives you a portable, embeddable diagram that renders natively in GitHub, Confluence, Azure DevOps, Notion, SharePoint, and any other Mermaid-capable tool.

## What Mermaid View Shows

Mermaid View gives you a text-based version of the current diagram. It is useful when you want a shareable view that can be pasted into documentation tools or copied into another Mermaid-capable system.

It focuses on the same architecture you see in the designer:

* The diagram keeps the current shape of the architecture
* The output stays readable in external tools
* The view is read-only, so it cannot change the diagram itself

![Switch an Order-to-Cash diagram to the Mermaid view and copy its Mermaid source, animated walkthrough (7.12)][2]  
*Animated walkthrough: an Active diagram of the [Order-to-Cash demo][O2C Demo] switches to the Mermaid view, then the Mermaid dialog copies the Mermaid source, ready to paste into GitHub, Azure DevOps, or Confluence.*  

1. Open an Active diagram. It opens in the interactive view.
2. Click **Mermaid view**, the second icon of the view switch in the canvas toolbar. Mermaid draws the same diagram; each flow is its own line with its protocol, and the view is read-only.
3. Click **Mermaid** in the page toolbar. A dialog opens with zoom, **Refresh**, **Print**, **Copy Mermaid source**, and **Download as image**.
4. Click **Copy Mermaid source**. The button reads **Copied!**; paste the markup into GitHub, Azure DevOps, or Confluence.

Bound nodes show the [Repository][Repository Model] name in the interactive view and the node's own label in Mermaid. When the two differ, the [Impact Inbox][Diagram Assistance] reports **Bound entity diverged**.

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>The Mermaid View follows the rules of the Mermaid language, so a node keeps its icon only when its <a href="https://docs.nodinite.com/repository-model/component-types/overview/">Component Type</a> uses a Font Awesome icon. Azure architecture icons, custom uploads, and the Mermaid logo are images and are dropped here and in every Mermaid export. Give Component Types Font Awesome icons when diagrams will be shared as Mermaid; see <a href="https://docs.nodinite.com/repository-model/component-types/features/what-is-a-component-type/#how-icons-render-in-c4-and-mermaid">How Icons Render in C4 and Mermaid</a>.</p></div>
</aside>

![Action menu of a Contoso Diagram Set with View, Edit, Show in Mapify, Show in Mermaid, Delete, and Permanently Delete (7.12)][1]  
*Open the Mermaid View with **Show in Mermaid** in the Action menu, next to View, Edit, and Show in Mapify ([Mapify][]).*  

## Example Output

The following is an example of Mermaid C4Container markup auto-generated by <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>

```mermaid
C4Container
    title API-Led Architecture (auto-generated from Repository)
    Person(partnerUser, "Partner", "External partner placing orders")
    Person(mobileUser, "Mobile User", "Uses the mobile app")
    Person(webUser, "Web User", "Uses the web portal")
    Boundary(experienceApis, "Experience APIs") {
        Container(edi850, "EDI 850", "BizTalk", "Receives purchase orders")
        Container(mobileApi, "Mobile API", "ASP.NET Core", "Handles mobile requests")
    }
    Boundary(processApis, "Process APIs") {
        Container(outbound, "Outbound", "Logic Apps", "Orchestrates outbound flows")
        Container(inbound, "Inbound", "Logic Apps", "Processes inbound messages")
    }
    Boundary(systemApis, "System APIs") {
        Container(purchaseOrders, "Purchase Orders", "REST/SQL", "CRUD for PO data")
        Container(shipments, "Shipments", "REST/SQL", "Manages shipment records")
    }
    System_Ext(erp, "ERP", "Handles financial transactions")
    System_Ext(wms, "WMS", "Manages warehouse and shipments")
    Rel(partnerUser, edi850, "Sends EDI 850", "AS2/SFTP")
    Rel(mobileUser, mobileApi, "Uses", "HTTPS")
    Rel(shipments, wms, "Reads/Writes", "REST")
```

## Diagram Level and Mermaid Type

The diagram type you select when you create the diagram controls which Mermaid C4 header <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> emits. When you [Import][] existing Mermaid markup, the type is auto-detected from the keyword on the first line:

| Diagram type | Mermaid output header | When to use |
|---|---|---|
| System Landscape (L0) | `C4Context` | Enterprise-wide view of all [Systems][] and their relationships |
| Context (L1) | `C4Context` | High-level people + [Systems][] overview for one central system |
| Container (L2) | `C4Container` | [Services][] and technology inside a [System][Systems] boundary |
| Component (L3) | `C4Component` | Internal structure of a single [Service][Services] |
| Deployment | `C4Deployment` | Infrastructure topology — where containers are hosted |
| Dynamic | `C4Dynamic` | Runtime interaction sequence for a specific workflow |

<h2 id="pages-for-the-mermaid-view">Where to Open the Mermaid View</h2>

The Mermaid View is not a page of its own. The diagram page, `/Repository/C4DiagramSets/{setId}/Diagrams/{id}`, opens in the interactive view, and you switch to Mermaid on that page; the switch is not part of the URL.

| Where | What it does |
|---|---|
| View switch in the canvas toolbar (**Interactive view** / **Mermaid view** icons) | Draws the diagram inline with Mermaid |
| **Mermaid** button in the page toolbar | Opens the Mermaid dialog: zoom, **Refresh**, **Print**, **Copy Mermaid source**, **Download as image** |
| <sup><span class="nodinite-new-badge">New 7.12</span></sup> **Sequence** button in the page toolbar, on a Dynamic diagram only | Opens the Mermaid dialog with **Sequence** picked: the numbered steps in order ([Dynamic Diagram Example][Dynamic Diagram Example - Sequence]) |
| **Print & Export** > **Mermaid (.md)** | Downloads the Mermaid markup as a file ([Export and Sharing][]) |
| Diagram Sets list > **Action** > **Show in Mermaid** | Draws the whole [Diagram Set][Diagram Set Fundamentals] |

Copy the markup into external tools such as GitHub README files, Confluence pages, or the [Mermaid Live Editor](https://mermaid.live/)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup>. Exported and copied markup leaves out the Font Awesome icons that <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> adds to the drawing; the dialog footer says so.

<h2 id="connector-message-members-in-mermaid">Connector Flows in Mermaid</h2>

On Context, Container, and Component diagrams, Interactive View may show one visible connector labelled `2 flows`, `3 flows`, or similar. That is a presentation choice to reduce clutter on the canvas.

The Mermaid output stays explicit:

* Each **flow** becomes its own relationship line
* Each flow keeps its own display name and protocol text
* Optional [Message Type][Message Types] links remain Repository metadata and are not written into the Mermaid markup

This means the Mermaid view can look more detailed than the interactive canvas. That is expected and useful when you want a text representation of every flow rather than the compact presentation used during diagram review.

## Sharing and Embedding

### Shareable URL

The diagram page's address is the link to share; there is no separate copy-URL button. The address is **stable and always reflects current data**: every time it is opened, the diagram is freshly generated from the current relational rows, so there are no stale screenshots. Opening it needs sign-in and access to the Diagram Set ([Role-Based Access for C4 Diagram Sets][]). To share outside <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>, copy the Mermaid source or export the diagram instead.

<sup><span class="nodinite-new-badge">New 7.12</span></sup> For the raw markup, use `/Repository/C4Diagrams/{id}/mermaid` on the [Web Client][] (Administrators: `/Admin/C4Diagrams/{id}/mermaid`, which also opens diagrams in restricted sets). It opens from the address bar, an e-mail, a wiki link, or a bookmark, and returns the diagram's Mermaid markup as plain text (`text/plain`) for a signed-in user with access to the set; scripts and wiki tooling can read it too. Unlike **Copy Mermaid source**, it keeps the `%% nodinite:node …` comment lines and the icon tokens in the labels. An unknown diagram, or one in a set you can't read, returns Not Found, without saying which of the two it was.

![The raw Mermaid markup of the Order-to-Cash - Context diagram, opened from the address bar as plain text (7.12)][3]  
*The `/mermaid` address of the Order-to-Cash - Context diagram in the Contoso O2C Operations set: the C4Context markup with its element and Rel lines, plus the nodinite:node metadata lines.*  

### Embedding in External Tools

Because the Mermaid markup is standard [C4 Mermaid syntax](https://mermaid.js.org/syntax/c4.html)<sup><i class="fal fa-arrow-up-right-from-square" aria-hidden="true"></i></sup>, it renders natively in:

* **GitHub** — paste into a `README.md` or wiki page inside a ` ```mermaid ``` ` block  
* **Confluence** — use the Mermaid macro or a compatible Confluence app  
* **Azure DevOps** — wiki pages support Mermaid natively  
* **Notion** — use the Mermaid code block  
* **SharePoint** — paste the copied markup into a Mermaid-capable web part  
* **Mermaid Live Editor** — for quick sharing and editing  

### Export Endpoint

A [Web API][] export endpoint returns the diagram as SVG, PNG, Mermaid markup, Structurizr DSL, PlantUML, or Draw.io XML, always reflecting the current state, for a signed-in user with access to the set. See [Export and Sharing][Export and Sharing] for the URLs and automation. For the Mermaid markup alone, the Web Client's `/Repository/C4Diagrams/{id}/mermaid` gives it without the Web API host (see [Shareable URL](#shareable-url)).

## Relationship to the Existing "Show in Mermaid" Feature

The existing **"Show in Mermaid"** action on individual Repository entities ([Integrations][], [Services][], [Systems][]) continues to work unchanged. It is useful for quick ad-hoc exploration.

The **C4 Diagram Mermaid View** is the diagram page for persistent, publishable architecture documentation.

Both capabilities are valuable and serve different use cases.

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-share-nodes" aria-hidden="true"></i> [Export and Sharing][Export and Sharing]  
* <i class="fal fa-pen-ruler" aria-hidden="true"></i> [C4 Designer – Interactive Canvas][C4 Designer]  
* <i class="fal fa-rocket" aria-hidden="true"></i> [Creating Your First C4 Diagram][Creating Your First C4 Diagram]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-circle-question" aria-hidden="true"></i> [What is C4 Diagrams?][What is C4 Diagrams]  
* <i class="fal fa-toolbox" aria-hidden="true"></i> [Shapes and Toolbox][]  
* <i class="fal fa-file-import" aria-hidden="true"></i> [Import][]  
* <i class="fal fa-folder" aria-hidden="true"></i> [Diagram Set Fundamentals][]  
* <i class="fal fa-shapes" aria-hidden="true"></i> [Component Types][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/C4/Set/Action_ViewMermaid.png
[2]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/C4/Set/C4_MermaidView.gif
[3]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Repository/C4/Set/C4_MermaidRawRoute.png

[C4 Designer]:https://docs.nodinite.com/repository-model/c4-diagrams/features/c4-designer/
[Component Types]:https://docs.nodinite.com/repository-model/component-types/overview/
[Creating Your First C4 Diagram]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/creating-your-first-c4-diagram/
[Diagram Assistance]:https://docs.nodinite.com/repository-model/c4-diagrams/features/diagram-assistance/
[Diagram Set Fundamentals]:https://docs.nodinite.com/repository-model/c4-diagrams/features/diagram-set-fundamentals/
[Dynamic Diagram Example - Sequence]:https://docs.nodinite.com/repository-model/c4-diagrams/getting-started/examples/order-to-cash/dynamic-diagram-example/#the-steps-as-a-sequence
[Export and Sharing]:https://docs.nodinite.com/repository-model/c4-diagrams/features/export-and-sharing/
[Import]:https://docs.nodinite.com/repository-model/c4-diagrams/features/import/
[Integrations]:https://docs.nodinite.com/repository-model/integrations/overview/
[Mapify]:https://docs.nodinite.com/mapify/overview/
[Mermaid Export Icons]:https://docs.nodinite.com/repository-model/component-types/features/what-is-a-component-type/#how-icons-render-in-c4-and-mermaid
[Message Types]:https://docs.nodinite.com/repository-model/message-types/overview/
[O2C Demo]:https://docs.nodinite.com/repository-model/bpms/examples/order-to-cash/overview/
[Repository Model]:https://docs.nodinite.com/repository-model/overview/
[Role-Based Access for C4 Diagram Sets]:https://docs.nodinite.com/repository-model/c4-diagrams/features/role-based-access-for-c4-diagram-sets/
[Services]:https://docs.nodinite.com/repository-model/services/overview/
[Shapes and Toolbox]:https://docs.nodinite.com/repository-model/c4-diagrams/features/shapes-and-toolbox/
[Systems]:https://docs.nodinite.com/repository-model/systems/overview/
[Web API]:https://docs.nodinite.com/core-services/web-api/overview/
[Web Client]:https://docs.nodinite.com/getting-started/overview/
[What is C4 Diagrams]:https://docs.nodinite.com/repository-model/c4-diagrams/features/what-is-c4-diagrams/