{
 "kind": "tool",
 "slug": "mermaid",
 "path": "tools/mermaid/",
 "name": "Mermaid",
 "maker": null,
 "density": "profile",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Charts and data visualisation",
   "tools/charts/"
  ]
 ],
 "lead": "Markdown-like syntax for creating flowcharts, diagrams, and visualizations programmatically.",
 "chips": [
  {
   "label": "Charts and data visualisation",
   "path": "tools/charts/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install mermaid"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/mermaid-js/mermaid"
  },
  {
   "label": "Website",
   "href": "https://github.com/mermaid-js/mermaid#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from npm.",
   "src": "https://github.com/mermaid-js/mermaid"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 13, 2026. ",
   "src": "https://github.com/mermaid-js/mermaid"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "74 projects",
   "status": "info",
   "sub": "#4 of 95 in its category",
   "note": "Dependency in 74 public GitHub projects set up for AI coding agents that we scanned (1.2%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://mermaid.ai/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Mermaid does",
   "parts": [
    {
     "t": "prose",
     "text": "Mermaid turns a few lines of Markdown-like text into a diagram, so diagrams can live in the repo next to the code and be diffed and reviewed instead of redrawn; the README pitches this as a fix for documentation that goes stale."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Mermaid popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "81",
       "of": "/ 100",
       "l": "Gid Score, #77 overall"
      },
      {
       "n": "28.7M",
       "l": "downloads a week, npm"
      },
      {
       "n": "91.2K",
       "l": "GitHub stars"
      },
      {
       "n": "74",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Mermaid is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Mermaid is a dependency in 74 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.5% of the 4,867 JavaScript/TypeScript ones), #4 of 95 in charts and data visualisation.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 196; those are left out of every share on this page.",
      "The most used alternative in our scan is Recharts (576 projects).",
      "Projects that use it most often also use remark-gfm (40.5%), jsdom (39.2%), React (68.9%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "52 projects, 1.6%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "40 projects, 1.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "18 projects, 0.7%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "16 projects, 3.4%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "11 projects, 3.2%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "9 projects, 1.9%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 40.5% of its projects",
       "v": "remark-gfm",
       "path": "tools/remark-gfm/"
      },
      {
       "l": "In 39.2% of its projects",
       "v": "jsdom",
       "path": "tools/jsdom/"
      },
      {
       "l": "In 68.9% of its projects",
       "v": "React",
       "path": "tools/react/"
      },
      {
       "l": "In 35.1% of its projects",
       "v": "react-markdown",
       "path": "tools/react-markdown/"
      },
      {
       "l": "In 36.5% of its projects",
       "v": "Testing Library",
       "path": "tools/testing-library/"
      },
      {
       "l": "In 50.0% of its projects",
       "v": "clsx",
       "path": "tools/clsx/"
      },
      {
       "l": "In 32.4% of its projects",
       "v": "Zustand",
       "path": "tools/zustand/"
      },
      {
       "l": "In 47.3% of its projects",
       "v": "Playwright (JavaScript)",
       "path": "tools/playwright-test/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Mermaid in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Diagrams diff like code",
       "v": "A Mermaid diagram is just text, so it goes through the same pull-request review as the code it describes. The README says diffs and reviews \"just work\"."
      },
      {
       "l": "GitHub renders it without a build step",
       "v": "The README says Mermaid code blocks render directly in Markdown on GitHub. A diagram in a README or docs file shows up as a picture with no extra tooling."
      },
      {
       "l": "One syntax family, many chart kinds",
       "v": "The README lists flowchart, sequence, class, state, ER, Gantt, pie, Git graph, mindmap, timeline and Sankey, and says there are more than 20 types in total."
      },
      {
       "l": "Language models write it well",
       "v": "Miro's product manager for its Mermaid feature writes that Mermaid \"has taken on a new life\" because LLMs are good at producing it. She also says agents can make targeted edits to a text diagram instead of regenerating it."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Lowercase <code>end</code> breaks flowcharts",
       "v": "The docs warn that <code>end</code> in all lowercase as a node ID or label breaks the flowchart parser. Use <code>End</code>, <code>END</code> or another word."
      },
      {
       "l": "Edge labels starting with o or x misparse",
       "v": "A label like <code>--&gt;|ok|</code> is read as a circle or cross edge. The docs say to add a leading space or capitalize it. Labels with commas, semicolons or parentheses also need quotes."
      },
      {
       "l": "Minor releases can move your layout",
       "v": "A recent minor release added <code>elk.orientFeedbackEdges</code>, enabled by default, which changes how some existing ELK diagrams are routed. To keep the old routing you have to set the option to <code>false</code>."
      }
     ]
    },
    {
     "t": "h3",
     "text": "A flowchart from the README"
    },
    {
     "t": "tabs",
     "label": "Example",
     "items": [
      {
       "tab": "Mermaid",
       "code": "flowchart LR\nA[Hard] -->|Text| B(Round)\nB --> C{Decision}\nC -->|One| D[Result 1]\nC -->|Two| E[Result 2]"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Mermaid",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/knsv",
        "GitHub Sponsors: https://github.com/sidharthv96",
        "3 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "mermaid-diagram: Generate Mermaid diagrams from user requirements. Supports flowcharts, sequence diagrams, class diagrams, ER diagrams, Gantt charts, and 18",
        "mermaid-to-proverif: Translates Mermaid sequenceDiagrams describing cryptographic protocols into ProVerif formal verification models (.pv files). Use when genera",
        "mermaid-studio: Expert Mermaid diagram creation, validation, and rendering with dual-engine output (SVG/PNG/ASCII). Supports all 20+ diagram types including",
        "mermaid-visualizer: Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, cre",
        "mermaid-visualizer: Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, cre",
        "mermaid-syntax: Mermaid syntax reference for writing or fixing a diagram in an artefact: flowchart, sequence, class, state, ER, Gantt, C4, mindmap, timeline"
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "react: UI library",
        "remark-gfm: GitHub-flavored Markdown for remark",
        "clsx: className string helper",
        "typescript: Typed JavaScript",
        "tailwindcss: Utility-first CSS",
        "class-variance-authority: Component style variants"
       ]
      },
      {
       "title": "More in Charts and data visualisation",
       "path": "tools/charts/",
       "items": [
        {
         "text": "Matplotlib",
         "path": "tools/matplotlib/"
        },
        {
         "text": "Chart.js",
         "path": "tools/chart-js/"
        },
        {
         "text": "XY Flow",
         "path": "tools/xyflow/"
        },
        {
         "text": "Seaborn",
         "path": "tools/seaborn/"
        },
        {
         "text": "Plotly",
         "path": "tools/plotly/"
        },
        {
         "text": "React Chart.js 2",
         "path": "tools/react-chartjs-2/"
        },
        {
         "text": "Diagrams",
         "path": "tools/diagrams/"
        },
        {
         "text": "Apache ECharts",
         "path": "tools/echarts/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Mermaid",
       "me": true,
       "facts": [
        "MIT",
        "Gid 81",
        "28.7M/wk"
       ]
      },
      {
       "name": "Recharts",
       "why": "Composable React component library for building responsive charts.",
       "path": "tools/recharts/",
       "facts": [
        "MIT",
        "Gid 85",
        "71.4M/wk"
       ]
      },
      {
       "name": "D3.js",
       "why": "JavaScript library for creating data-driven documents with powerful data visualization capabilities.",
       "path": "tools/d3/",
       "facts": [
        "ISC",
        "Gid 81",
        "36M/wk"
       ]
      }
     ],
     "more": "Compare Mermaid with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "npm install mermaid"
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Mermaid\n- Start every diagram with its type declaration, for example `flowchart LR` or `sequenceDiagram`.\n- Never use lowercase `end` as a flowchart node ID or label; write `End` or `END`.\n- If an edge label starts with `o` or `x`, add a leading space or capitalize it (`-->| ok|` or `-->|Ok|`) so it is not read as a circle or cross edge.\n- Wrap node labels that contain parentheses, commas or semicolons in quotes: `A[\"This label has (parentheses)\"]`.\n- Define a node's label once and reference it by ID everywhere else.\n- When upgrading, check the release notes for layout changes: with ELK, set `elk.orientFeedbackEdges: false` to keep the previous routing.\n"
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm mermaid"
  ],
  [
   "Category",
   "Charts and data visualisation"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "@mermaid-js/tiny@12.1.0, October 2, 2026"
  ],
  [
   "On GitHub since",
   "November 2014"
  ],
  [
   "Gid Score",
   "81.4"
  ],
  [
   "Rank in category",
   "#4 of 95"
  ],
  [
   "GitHub",
   "mermaid-js/mermaid"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/mermaid-js.png"
}