Markdown Mermaid Diagrams
A Complete Guide to Mermaid Diagrams in Markdown
This article demonstrates how to create diagrams in Markdown with Mermaid, including flowcharts, sequence diagrams, ER diagrams, class diagrams, state diagrams, XY charts, Gantt charts, mind maps, and more.
Mermaid diagrams are powered by Merman. Firefly generates separate light and dark static SVGs during the Astro build, so no Mermaid rendering runtime is loaded in the browser. Visit Merman Playground to edit the syntax and preview the results interactively.
Flowchart Example
Flowcharts are well suited to describing processes and algorithm steps.
Sequence Diagram Example
Sequence diagrams show how objects interact over time.
ER Diagram Example
ER diagrams, or entity-relationship diagrams, are useful for representing database structures.
Class Diagram Example
Class diagrams show the static structure of a system, including classes, properties, methods, and their relationships.
State Diagram Example
State diagrams show the sequence of states an object passes through during its lifecycle.
XY Chart Example
XY charts are useful for displaying trends and comparing data.
Pie Chart Example
Pie charts clearly show each part’s proportion of a whole.
Gantt Chart Example
Gantt charts show project phases, task dependencies, and current progress on a timeline.
Mind Map Example
Mind maps help organize topic hierarchies and knowledge structures.
Timeline Example
Timelines present important project events by year or phase.
User Journey Example
User journey diagrams describe user actions and experience scores at different stages.
Git Graph Example
Git graphs clearly show branches, commits, and merge history.
Kanban Example
Kanban boards show how tasks are distributed across workflow stages.
Sankey Diagram Example
Sankey diagrams use link widths to represent the amount of flow between nodes.
Summary
Mermaid is a powerful tool for creating many kinds of diagrams in Markdown. This article demonstrated flowcharts, sequence diagrams, ER and class diagrams, state diagrams, XY and pie charts, Gantt charts, mind maps, timelines, user journeys, Git graphs, Kanban boards, and Sankey diagrams. These diagrams help explain complex concepts, processes, and data structures more clearly.
To use Mermaid, specify the mermaid language on a fenced code block and describe your diagram with its concise text syntax. Diagrams are automatically rendered to SVG at build time, without loading client-side JavaScript.
Try more syntax in Merman Playground and then paste the diagram code into your article.
Support & Share
If this article helped you, please share or support!













