Sankey Diagram Maker
Add flows in the list, or paste rows from a spreadsheet, and the diagram draws itself. Drag nodes and labels anywhere, set flow thickness and gaps, then export SVG, PNG up to 4× or a vector PDF.
- Diagrams are drawn locally in your browser. Nothing is uploaded to a server.
Enter in the amount adds the next flow. Paste or drop a CSV or TSV with source, target and value columns to fill the list.
One flow per line as Source [amount] Target. :Node #hex colours a node, // starts a comment. The list and the text stay in sync.
Drag nodes and labels to move them, drag the background to pan, scroll or pinch to zoom. Arrow keys move a focused node.
Layout
Leave blank to export at actual size. A size scales the export to fit inside it.
Colours
Node colours
Text and values
How it works
Add your flows in the list: a source, a target and an amount per row. Press + Add flow, or Enter in the amount, for the next row. Or load an example, or paste or drop a CSV with source, target and value columns.
The diagram redraws as you type. Drag nodes and labels anywhere on the canvas, scroll or pinch to zoom and drag the background to pan. Set flow thickness, node gap and column gap, and tune alignment, palette, labels and values in the options.
Download the SVG, a PNG at 1× to 4× or a vector PDF, or copy the PNG to the clipboard. Use Share at the top to get a link that carries the whole diagram, including your arrangement.
A Sankey diagram draws flows as bands whose width is proportional to the amount. It shows at a glance where a quantity comes from, where it goes and where it is lost, which is why it is popular for budgets, energy balances, website funnels and income statements.
Editing flows
Each row in the list is one flow. Node names are suggested as you type, so the same node is reused instead of duplicated. The swatch on a row sets that link's colour, and the Node colours panel sets the colour of each node. A row that can't be drawn says why right under it, and the rest of the diagram is still drawn.
Amounts accept thousands separators and either decimal mark: 1,250.75, 1.250,75 and 12,5 all work. A single comma followed by exactly three digits, such as 1,250, is read as a thousands separator; the row shows the value it read.
Text view
The Text tab shows the same flows in the widely used SankeyMATIC style, which is handy for copying a whole diagram or typing quickly. Changes in either view appear in the other.
// a comment
Salary [4600] Budget
Budget [1450] Housing #e15759
Budget [620] Food
Budget [1,000.50] Savings
:Housing #e15759
:Savings #59a14f
Source [amount] Targetadds a flow.- A trailing
#hexcolours that link, for example#8cd17d. :Node Name #hexsets the colour of a node.- Lines starting with
//are comments and blank lines are ignored.
Arranging the diagram
The first layout orders nodes so that bands cross as little as possible. After that the canvas is yours: drag a node anywhere, even past the edge, and the diagram grows with it. Bands re-sort themselves as you move nodes, and labels move out of the way of bands, or can be dragged on their own. New nodes are placed automatically without disturbing the ones you moved. Reset arrangement brings back the automatic layout, and Fit shows the whole diagram.
Flow thickness sets how many pixels a unit of flow takes, so every band grows or shrinks together. Node gap is the space between nodes in a column and Column gap the distance between columns; by default the column gap leaves room for the longest label.
Working from a spreadsheet
Copy three columns from Excel or Google Sheets (source, target, value) and paste them into the list. A header row is detected and skipped. A fourth column holding a hex colour sets the link colour. Comma, tab, semicolon and pipe separated data all work, and quoted CSV is understood.
Balance check
For every node that has both incoming and outgoing flows, the tool compares the two totals. Nodes where they differ are listed under the editor. This is informational: a gap is often intended, for example when part of a flow is not shown.
Frequently asked questions
Frequently asked questions
What is a Sankey diagram?
A Sankey diagram shows how a quantity flows between stages. Nodes are the stages, links are the flows, and the width of each link is proportional to its amount. Typical uses are budgets, energy and material flows, website funnels and income statements.
Is my data uploaded to a server?
No. Layout, drawing and export, including the PDF, all run inside this page on your device. Your flows, settings and arrangement are kept in this browser's local storage so a refresh doesn't lose them, and nothing is sent anywhere.
How do I make a Sankey diagram from Excel or a CSV file?
Arrange the data in three columns: source, target and value. Copy the cells from Excel or Google Sheets and paste them into the flow list, or drop a CSV or TSV file on it. Each row becomes a flow you can edit, and the diagram draws itself.
How do I export a Sankey diagram for PowerPoint, Word or print?
Download a PNG at 2× or 4× for slides and documents, or copy the PNG straight to the clipboard and paste it. Download the PDF for print and reports: it is vector, so it stays sharp at any zoom, and its text stays selectable. Download the SVG to edit shapes and text later in PowerPoint, Illustrator, Figma or Inkscape.
How do I move nodes and make more space between them?
Drag any node or label to place it anywhere; the canvas grows with it, and the export always fits the whole diagram. Use Flow thickness to make all bands thicker or thinner, Node gap for the space between nodes in a column, and Column gap for the distance between columns. Scroll or pinch to zoom, drag the background to pan, and press Fit to see everything. Reset arrangement brings back the automatic layout.
Why does it say my flows contain a loop?
A Sankey layout places nodes in columns from left to right, so flows must only move forward. If A leads to B and B leads back to A, no column order exists. The error names the nodes in the loop; remove or merge one of those links, for example by showing the return flow as a separate node.