Sankey Diagram Maker: Build Flows From a Table

Paste a three-column table into this free sankey diagram maker and it draws the flows in seconds. You don't need to sign up.

Sankey diagram titled Monthly budget. Salary (4,000) and Side income (600) flow into Budget, which splits into Rent 1,500, Groceries 600, Transport 300, Utilities 400, Savings 1,200 and Fun 600. Salary Budget Side income Rent Groceries Transport Utilities Savings Fun Monthly budget $4,600 in, where it goes chartjuice.com

How to make a sankey diagram in 3 steps

  1. The Data tab in Chartjuice, with Upload file and Paste data beside a sankey diagram
    1

    Add your data

    Click Paste data, paste a From, To, Amount table from Excel or Google Sheets, then click Use this data. You can also click Upload file or type into the table under the chart.

  2. The Style tab in Chartjuice, open beside a sankey diagram
    2

    Style it

    Open the Style tab. Pick a palette under Colors, then change Direction, Node width, Node spacing and Flow opacity under Sankey options.

  3. The Download menu in Chartjuice: PNG at 1x, 2x or 4x, SVG and Copy image
    3

    Download

    Click Download and choose PNG at 1x, 2x or 4x, or SVG. Copy image puts it on your clipboard for a slide or doc.

Formatting your data for a sankey diagram maker

A sankey diagram is a list of flows. Each row of your table is one flow, and it needs three columns:

  • From: where the flow starts.
  • To: where it ends.
  • Amount: how much moves, as a plain number. The bigger the number, the thicker the band.

There is no code to write and no node list to set up. Chartjuice builds the nodes from the names in From and To. If your columns have other headings, use Chart columns in the Data tab to say which is which.

Four rules keep the diagram clean:

  • Spell each node the same way every time. "Rent" and "rent" are two different nodes.
  • Use plain numbers in Amount. No currency symbols, commas or "k". Put the unit in the chart title.
  • One row per flow. If a From and To pair repeats, Chartjuice adds the amounts together.
  • Expect blanks and zeros to be skipped. A row with a missing name, a text amount or an amount of zero or less is left out, and a notice under the chart says how many.

Copy this sample table

Select the table, copy it, click Paste data, paste, and click Use this data. Or paste it straight into the table under the chart.

From To Amount
Paycheck Budget 3000
Budget Housing 1100
Budget Food 450
Budget Transport 250
Budget Savings 600
Budget Fun 300
Budget Other 300
Food Groceries 350
Food Eating out 100

Chaining stages into multilevel flows

A name can be a To in one row and a From in another. In the sample, Budget receives 3,000 from Paycheck and sends it to six places, and Food passes its 450 on to Groceries and Eating out. That makes three stages. Add rows for more stages, as long as everything keeps moving forward.

Common uses for a sankey diagram

The same three columns cover most of what people draw.

Personal budgets. Income on the left, spending on the right, with Savings as its own band. The preset above is a monthly budget.

Income statements. Revenue splits into cost of goods and gross profit, and gross profit splits again down to net profit. A row looks like Revenue, Gross profit, 590.

Marketing funnels. Traffic sources feed Visitors, and Visitors split into Signed up and Left. Give drop-off its own node so the loss is visible instead of implied.

Energy flows. Sources (gas, coal, solar and wind, nuclear) flow into Electricity, then out to Homes, Businesses and Industry. Add a "Lost" node to show losses, so what goes into a node matches what comes out.

If you only need to compare totals across a few categories, a stacked bar chart is simpler. A sankey is the better choice when you want to show where amounts go and how they split. For other kinds of data, see the full set of chart makers.

Tips for readable flows

  • Keep each stage to about five to eight nodes. More than that and the bands tangle.
  • Group small flows. Add the tiny ones into one "Other" row. Thin slivers can't be read.
  • Use short names. "Rent" beats "Monthly rent payment". If long labels crowd the last stage, try Direction: Top to bottom.
  • Show the numbers. Open Value labels in the Style tab and turn on Show values on the chart.
  • Keep one unit, not a mix of dollars and visits.
  • Give crowded stages more room. Raise Node spacing, or lower Flow opacity, under Sankey options.

Each node gets a color from the palette you choose under Colors, and each flow fades from its source node's color to its target's.

Fix a sankey diagram that looks wrong

  • A node appears twice. The names don't match exactly. Check spelling and capitalization, and fix the cell in the table under the chart.
  • A flow is missing. Its amount is probably text, blank or zero. The notice under the chart says how many rows were skipped. Retype the amount as a plain number.
  • The chart shows an error instead of a diagram. Look for a loop. A flow can't return to an earlier node, so Savings can't feed back into Budget. Chartjuice names the loop it found and won't draw the diagram. Loops aren't supported.

Everything you need to make a sankey diagram

  • Upload a file

    Upload a CSV, TSV, XLSX, XLS or ODS with From, To and Amount columns, or drop it on the designer. Files are read in your browser and never uploaded.

    The Paste data dialog in Chartjuice with a table pasted from a spreadsheet
  • Looks good out of the box

    Nodes take colors from a clean palette, and each flow fades from its source color to its target color. A preset palette recolors the whole diagram, and Pro adds your saved brand colors.

    The Colors section in Chartjuice with preset palettes, open beside a sankey diagram
  • Design with AI

    Click Ask AI and type "make the nodes narrower and the flows lighter". Adjust anything it changes by hand. You get 3 free tries after signing in, and 50 messages a day on Pro.

    See what the AI graph maker can do

    The Chartjuice AI assistant editing a sankey diagram from a plain-English request
  • Download PNG or SVG

    Download a PNG at 1x, 2x or 4x with an optional transparent background, or an SVG. Free downloads carry a small, faint "chartjuice.com" in the bottom-right corner, and Pro removes it. You can use them anywhere, including commercial work, with no other credit.

    A sankey diagram downloaded from Chartjuice as a PNG

Frequently asked questions

What data do I need for a sankey diagram?

A table with one row per flow and three columns: From, To and Amount. Names must match exactly wherever they repeat, and Amount must be a plain number. The limit is 5,000 rows by 50 columns per chart.

Can a flow loop back to an earlier stage?

No. Loops (cycles) are not supported. If one row sends a flow from A to B and another sends it from B back to A, Chartjuice shows an error that names the loop and does not draw the diagram. Every flow has to move forward.

How do I make an income statement sankey?

Put revenue sources in From and Revenue in To. Then add rows that split revenue into cost of goods and gross profit, gross profit into operating expenses and operating profit, and operating profit into taxes and net profit. The Income statement example further down is already built; replace its numbers with yours.

Can I color each flow?

Not one by one. Flows take their color from the nodes they connect, fading from source to target. To change the colors, pick another palette under Colors in the Style tab. To make flows stand out more or less, change Flow opacity under Sankey options.

Can ChatGPT or Claude make a sankey diagram?

Yes. Connect an AI assistant to Chartjuice once, then describe the flows in plain words. The diagram is saved to your account and opens in the editor.

Is my budget or financial data private?

In the editor, files are read in your browser and never uploaded. The AI assistant sees column names and small samples of the data, not the whole file. Your data is stored only if you sign in and click Save.

Want the full tour? Read how Chartjuice works.

Save your sankey diagrams with a free account

Chartjuice is free, with no signup to make or download a chart. A free account saves your charts so you can rename, duplicate and edit them later.