Mermaid Open-source text-to-diagram renderer for documentation workflows, with host-version, layout and security configuration boundaries.
Overview Mermaid renders diagrams from text definitions instead of relying on manual placement on a drawing canvas. It can be embedded into documentation systems or used through editors and command-line tools. Renderer versions, deployment configuration and the distinction between source text and exported graphics are important substitution boundaries.[2] [3] [4]
Contents Diagrams maintained as text Mermaid is a JavaScript-based renderer for diagrams described using a Markdown-inspired syntax. Supported diagram families include flowcharts, sequence diagrams, class diagrams and entity relationships. Its documentation-oriented workflow makes the textual definition the editable source, allowing diagram changes to accompany changes to surrounding technical documentation.[2]
The core project is MIT-licensed. It can be integrated into another application or rendered through supporting tools; the software license should not be conflated with the accounts, pricing or collaboration features of a particular hosted editor. This article concerns the Mermaid renderer and its documented ecosystem rather than a commercial diagramming subscription.[1] [2]
Embedding and rendering environments A website can load Mermaid and render marked diagram definitions into SVG. Existing documentation platforms can provide their own integration instead. GitHub, for example, renders Mermaid fenced blocks and advises checking its current Mermaid version when syntax fails. A diagram supported by the newest upstream renderer may not yet work in every host.[3] [4]
The current usage guide distinguishes the full package from Mermaid Tiny. The smaller build omits features including mindmaps, architecture diagrams, KaTeX and the ELK layout engine. Its documented layout fallback means that reducing deployment size can change the rendered arrangement, even when a diagram still renders successfully.[3]
Exports and accessibility The Mermaid command-line project converts diagram definitions into SVG, PNG or PDF and can process Mermaid blocks in Markdown. This supports repeatable document-generation workflows. Keeping the definition alongside exported graphics preserves an editable source rather than relying on a screenshot as the only remaining representation.[5]
Mermaid provides accessible title and description fields that are reflected in the rendered SVG’s accessibility attributes. These fields let an author supply context beyond the visible labels. Merely choosing a diagram renderer does not write that explanation; its usefulness depends on the information supplied by the diagram author.[6]
Untrusted diagram input The default strict security setting encodes HTML tags and disables click behavior. Other settings change that trust boundary, while sandbox mode renders inside an isolated frame and can limit interactivity. These are deployment choices for the application accepting diagram text, not a reason to assume every embedded diagram is safe under any configuration.[3]
Where it substitutes Mermaid can substitute for draw.io for flowcharts and technical diagrams maintained as part of text-based documentation. It changes the authoring method from direct canvas editing to source definitions and renderer-controlled layout. Host syntax support, custom visual requirements and the need for interactive manual arrangement constrain that substitution.[2] [3] [4] [7] [8]
References Mermaid license MIT license
vendor · retrieved 2026-10-06 About Mermaid Text-defined JavaScript diagram renderer and diagram types
vendor · retrieved 2026-10-06 Mermaid usage Runtime, Tiny build and security-mode boundaries
vendor · retrieved 2026-10-06 GitHub diagram rendering Mermaid fenced blocks and renderer version compatibility
vendor · retrieved 2026-10-06 Mermaid CLI Diagram source to SVG, PNG and PDF; Markdown rendering
vendor · retrieved 2026-10-06 Mermaid accessibility Accessible titles and descriptions in rendered diagrams
vendor · retrieved 2026-10-06 draw.io Apache 2.0 source; free editor and storage choice
vendor · retrieved 2026-10-06 draw.io PNG export Optional embedded diagram data; current page versus whole multipage file
vendor · retrieved 2026-10-06 Also included: 4 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.