Mermaid for
Sankey diagrams
Visualize how budgets, users, energy, or traffic move and split across a system, with each flow drawn to scale.
A Sankey diagram shows how a quantity flows from one set of nodes to another. Each link is drawn as a band whose width is proportional to its value, so the largest flows and the biggest losses are visible at a glance.
The format is named after Matthew Henry Phineas Riall Sankey, an Irish engineer who used it in 1898 to show the energy efficiency of a steam engine. It is now common in energy analysis, finance, operations, and product analytics. In Mermaid, a Sankey diagram is written as CSV: each line is a source, a target, and a value. You can paste rows from a spreadsheet and Mermaid draws the diagram.
Map where resources, budget, or users go, and where the largest drop-offs happen.
Show clients where value is being created or lost across a process.
Traffic by source flowing into signups, trials, and paid conversions — showing drop-off at each stage.
Total budget flowing into headcount, infrastructure, marketing, and operations — with sub-breakdowns per category.
Total energy input distributed across heating, cooling, lighting, and equipment — with waste flows included.
Gross revenue flowing through direct, partner, and self-serve channels into each customer segment.
One shared canvas for mapping ideas, collaborating live, and keeping teams on the same page, literally.
Common questions about building Sankey diagrams in Mermaid.