Install
dotnet add package Mermaider --version 0.18.0
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard |
README
Mermaider

Render Mermaid diagrams to SVG in pure .NET. No browser, no DOM, no JavaScript runtime. AOT-ready.

Install
dotnet add package Mermaider
Quick start
using Mermaider;
var svg = MermaidRenderer.RenderSvg("""
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[OK]
B -->|No| D[End]
""");
// the same diagram as text, for a terminal, a log or a pull-request comment
var text = MermaidRenderer.RenderAscii("""
flowchart LR
A[(OrderEvents)] -->|"2/s"| B{{Orders}}
B --> C[Order]
""");
Hand it a Mermaid string; get a sanitized, consistently styled SVG back. No interop, no child processes, no headless browsers.
- Pure .NET, zero interop: just a NuGet reference. No Chromium, no Node.js, no subprocess management.
- Native AOT: every public API proven in CI on Linux, macOS and Windows.
- Built-in layout engine: Sugiyama, a zero-dependency layered layout with compound subgraphs and an orthogonal edge router.
- 24 diagram types: one API, one theming model for all of them.
- Unified theming: 15 themes, live-switchable via CSS custom properties.
- Always-on SVG sanitization: allowlist-only, no opt-out.
- Strict styling mode: enforce your design system on user-authored diagrams.
- Fast: ~95 µs and ~209 KB allocated to render a simple flowchart end to end.
Learn more
- Documentation: https://mermaider.nullean.net
- The full reference, with every render option and an example of each diagram type: https://github.com/nullean/mermaider#readme
- The command line tool: Mermaider.Cli
- Source and issues: https://github.com/nullean/mermaider
Changes from Previous Version
v0.17.0v0.18.0
Added Frameworks
net11.0net7.0.NETStandard2.0.NETStandard2.1
Added Dependencies
Sugiyama(net11.0)
Microsoft.Extensions.ObjectPool(net11.0)
Sugiyama(net7.0)
Microsoft.Bcl.TimeProvider(net7.0)
Microsoft.Extensions.ObjectPool(net7.0)
System.IO.Pipelines(net7.0)
Sugiyama(.NETStandard2.0)
Microsoft.Bcl.TimeProvider(.NETStandard2.0)
Microsoft.Extensions.ObjectPool(.NETStandard2.0)
System.IO.Pipelines(.NETStandard2.0)
System.Memory(.NETStandard2.0)
System.Text.Json(.NETStandard2.0)
Sugiyama(.NETStandard2.1)
Microsoft.Bcl.TimeProvider(.NETStandard2.1)
Microsoft.Extensions.ObjectPool(.NETStandard2.1)
+2 moreAdoption Assessment
Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.
Compatibility metadata lists 5 target frameworks; confirm the exact target used by your application.The published metadata declares 19 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.