Mermaid for

Sankey diagrams

Show where everything flows

Visualize how budgets, users, energy, or traffic move and split across a system, with each flow drawn to scale.

What is a Sankey diagram?

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.

What you can map
with a Sankey diagram

User funnel and conversion analysis

Energy and resource flow visualization

Budget allocation and spend tracking

Traffic and referral source breakdowns

Supply chain and material flow

Revenue by segment or channel

Data pipeline volume tracking

User funnel and conversion analysis

Energy and resource flow visualization

Budget allocation and spend tracking

Traffic and referral source breakdowns

Supply chain and material flow

Revenue by segment or channel

Data pipeline volume tracking

Who uses Sankey diagrams
on Mermaid

Data Analysts

Show how values flow and distribute across categories in a format that communicates magnitude at a glance.

Business Analysts

Map where resources, budget, or users go, and where the largest drop-offs happen.

Startup Founders

Show your conversion funnel, revenue breakdown, or cost structure in a way investors can read quickly.

Consultants

Show clients where value is being created or lost across a process.

Project Managers

Track how effort or budget is being split across teams and workstreams.

When a Sankey diagram is
the right call

Less time syncing, more time building

One shared canvas for mapping ideas, collaborating live, and keeping teams on the same page, literally.

FAQ

Common questions about building Sankey diagrams in Mermaid.

FAQ Icon