Basic flow (LR)
Linear left-to-right flow with start, middle steps, and end.
Mermaid Diagram Inventory
A curated catalog of flowchart, sequence, class, state, ER, gantt, pie, mindmap, timeline, journey, git graph, and quadrant templates. Every card renders the diagram live — pick visually, copy the fenced ```mermaid block, paste into your Markdown. Works on GitHub, GitLab, Notion, Docusaurus, MkDocs, Obsidian, and any platform that speaks Markdown.
Inventory
Filter by name or category. Click Copy on any card to put the fenced ```mermaid block on your clipboard. Diagrams render automatically — no extra clicks.
Linear left-to-right flow with start, middle steps, and end.
Branching workflow with a yes/no decision.
Client → API gateway → service → database round trip.
Browser, server, and database during a login flow.
Sync and async messages between three actors.
Animal base class with two subclasses.
Order composes line items.
Lifecycle of an order from creation to delivery.
Anonymous, authenticated, expired session states.
Users, posts, and comments with relations.
Customers, orders, products, and line items.
Design, build, QA, ship rhythm.
Quick distribution chart with four slices.
Central topic with branches and sub-branches.
Quarterly roadmap with major milestones.
Compact funnel with satisfaction scores.
Trunk-based development with a feature branch merge.
Impact vs effort 2×2 with sample items.
Commit → build → test → deploy with rollback branch.
Request → retry loop → give up after N attempts.
Three-leg OAuth 2.0 with code exchange.
Checkout → tokenize → authorize → capture.
Cyclic state machine: red → green → yellow → red.
Play / pause / stop with buffer state.
Tenants, users, projects schema.
Beta, marketing, GA, and post-launch follow-up.
Where visitors come from.
Branches of a typical full-stack skill tree.
Year-by-year highlights for a young company.
Critical fix branched off main and back-merged.
Urgent vs important task prioritization.
Mermaid is a text-to-diagram language born at SAP and now maintained by an active open-source community. You write a diagram as plain text inside a Markdown code fence with the language tag mermaid — the renderer turns it into an SVG diagram at view time:
```mermaid
flowchart LR
A[Start] --> B[Done]
```
Same source. Every platform. No image hosting, no asset pipeline, no broken links when you rename a section.
Before Mermaid, technical writers had three choices: hand-draw a diagram in a UI tool and embed the exported PNG (impossible to diff, hard to keep in sync), use a heavy authoring app like Lucidchart or Draw.io (paid, requires manual sync), or skip the diagram entirely and describe the flow in prose. Mermaid removed all three trade-offs:
| Platform | Mermaid support |
|---|---|
| GitHub README / issues / PRs | Built-in since 2022 |
| GitLab Markdown | Built-in |
| Bitbucket Cloud | Built-in |
| Notion | Embed block |
| Obsidian | Built-in |
| Joplin | Built-in |
| Docusaurus | @docusaurus/theme-mermaid |
| MkDocs Material | pymdownx.superfences |
| Hugo | Mermaid shortcode |
| Astro | rehype-mermaid |
| Markdown Viewer editor (this one) | Live, in the preview pane |
| Type | Use for |
|---|---|
| Flowchart | Processes, decisions, system architectures |
| Sequence | API calls, message exchanges, login flows |
| Class | OO domain models, type hierarchies |
| State | Finite state machines, order lifecycles |
| ER | Database schema, entity relations |
| Gantt | Project timelines, sprint planning |
| Pie | Quick percentage breakdowns |
| Mindmap | Brainstorms, taxonomies |
| Timeline | Roadmaps, history |
| Journey | User journey mapping with satisfaction scores |
| Git graph | Branching workflows |
| Quadrant | Impact-vs-effort and similar 2×2 matrices |
LR (left to right), TD (top down), BT (bottom up), RL (right to left).[Text] rectangle, (Text) rounded, {Text} rhombus (decision), ((Text)) circle, [(Text)] cylinder (database), [[Text]] subroutine, [/Text/] parallelogram (I/O).--> solid arrow, -.-> dashed, ==> thick, -- label --> labeled, --- open line.subgraph Title … end groups nodes inside a container.%% comment (line is ignored by parser).%%{init: {'theme':'dark'}}%% at the top to set theme and other options.A blank mermaid fence is intimidating. The syntax for sequence diagrams vs flowcharts vs ER diagrams is different — same library, different mini-languages. Templates give you:
participant or actor.Free for any project — personal, commercial, internal. No signup, no API key, no attribution required.
More free browser tools in the same workflow.
Ship Markdown features in your product with our REST API — render, convert, audit, and transform documents at scale.
New to the platform? Start with the API quickstart, then try a live request in the API playground.
Explore the API platform