Sankey Diagram Maker

Three columns — source, target, and value — become a flow diagram where link thickness is proportional to quantity. Sankey diagrams are the right format for a quantity that moves through a system and splits or merges along the way, which a funnel or a bar chart cannot represent.

How to use it

  1. Paste three columns: Source, Target, and Value.
  2. Check that flows into each intermediate node equal flows out of it.
  3. Add explicit nodes for losses and drop-out rather than letting flow disappear.
  4. Choose a theme and export a high-resolution PNG.

The data model

Each row is one directed link: a quantity moving from one named node to another. Nodes are created implicitly from the names, so you never declare them — a node exists because something flows into or out of it.

Layout is computed rather than specified. Nodes are placed in columns based on their depth in the graph, and vertical positions are chosen to reduce link crossings. You control the structure through the data and not the arrangement directly, which is usually a relief and occasionally frustrating.

Node names must match exactly to be treated as the same node. A trailing space, a different capitalisation, or "Marketing" against "Marketing " produces two separate nodes, and the symptom is a diagram with duplicated columns that looks structurally wrong. This is the most common data problem with the format and it is worth checking first when the output looks odd.

Conservation of flow

The convention that makes a Sankey readable is that quantity is conserved: what flows into an intermediate node flows out of it. That is what allows a reader to trace a thickness through the diagram and trust it.

When flow is not conserved, the diagram silently absorbs the difference and the visual becomes misleading. If 1,000 visitors flow into a Signup node and only 300 flow out, the diagram shows 300 leaving and nothing indicating what happened to the other 700 — the reader sees a thick input and a thin output with no accounting.

The fix is to make the losses explicit. Add a Dropped Off or Lost node and route the remaining 700 into it. The diagram now balances, the drop-out is visible at the size it actually is, and the reader can see where attrition happens rather than inferring it from thickness changes.

This is the same discipline that makes an energy Sankey work — waste heat is drawn as a flow rather than left as a gap — and it is the main thing that separates a Sankey which explains a system from one that merely decorates it.

What it does that a funnel cannot

A funnel represents a linear sequence with attrition. A Sankey represents a network, and the difference matters whenever the process has real structure.

Branching is the main case. If traffic arrives from search, social, and referral and each converts at a different rate, a funnel averages them into a single misleading number. A Sankey keeps the paths separate and visible, so a channel that sends volume but does not convert is obvious rather than hidden in an aggregate.

Merging works equally well: several routes converging on the same outcome, with the relative contribution of each visible in the thickness. Multi-stage networks with both splits and merges — a budget flowing from revenue sources through departments to expense categories — are the format natural home.

The trade-off is precision. A funnel gives clear stage-to-stage percentages; a Sankey asks the reader to compare thicknesses, which is a length judgement and less accurate than reading a number. For a simple linear process the funnel is the better tool, and reaching for a Sankey when the structure is linear adds complexity without adding information.

Legibility limits

Sankey diagrams degrade quickly with size. Twenty or thirty nodes is usually the point where the layout algorithm can no longer avoid crossings, links overlap, and labels collide.

Thin links are the practical problem. A flow that is a fraction of a percent of the total renders as a hairline that cannot be traced across the diagram. Filtering below a threshold, or grouping small flows into an Other node, keeps the diagram readable and loses little — a link too thin to see was not communicating anyway.

Cycles are the structural limit. A Sankey assumes flow moves in one direction, so a genuine loop — value returning to an earlier node — cannot be laid out in columns. The layout will either break or produce a backward link that reads as an error. Processes with real feedback need a different representation, or a model that unrolls the loop into distinct stages.

Colour is best used sparingly here, since thickness already encodes the quantity. Colouring by source is useful for tracing where a flow originated through several hops; colouring every node differently adds noise without adding meaning.

At a glance

Input formatThree columns: Source, Target, Value
NodesCreated implicitly from names, matched exactly
LayoutComputed by depth, crossings minimised
CyclesNot supported, flow must be one-directional
Practical node limitAround twenty to thirty

Frequently asked questions

What columns does it need?

Exactly three: Source, Target, and Value. Each row is one directed flow, and nodes are created from the names.

Why does my diagram show duplicate nodes?

Node names must match exactly. A trailing space or a capitalisation difference creates a second node.

What happens to flow that drops out?

Nothing visible, unless you model it. Add an explicit Lost or Dropped Off node so the diagram balances and the attrition is visible.

When should I use a Sankey instead of a funnel?

When the process branches or merges. A funnel averages different paths into one misleading rate; a Sankey keeps them separate.

Can flows loop back?

No. The layout assumes one-directional flow, so cycles cannot be drawn. Unroll the loop into distinct stages instead.

Read more

Flow and change — Two bars tell you a number changed. These formats tell you what changed it, which is usually the question.

Related chart makers