How to make a treemap
- Enter one item per row with its value. Values must be positive.
- Optionally fill in Group to nest items inside labelled parent blocks, for example sectors containing companies.
- Choose a layout algorithm in Customize → Chart options. Squarified gives the most readable shapes.
- Toggle values, percentages and group headers, and pick a palette.
- Download your treemap.
Data format
| Column | Type | Notes |
|---|---|---|
| Group (optional) | Text | Optional |
| Item | Text | Required |
| Value | Number (zero or positive) | Required |
Up to 1,000 rows. One row per rectangle. Each rectangle’s area is proportional to its value. Fill in Group to nest items inside labelled parent blocks (two levels). Values must be positive.
Customization options
- Squarified, binary or slice-and-dice layouts.
- Two-level grouping with labelled group headers and a legend.
- Labels with values and % of total, wrapped to fit each rectangle.
- Sort by size or keep your order (slice-and-dice).
- Group colors, with members shaded slightly differently so neighbours stay distinct.
Downloading and exporting
- PNG: best for slides, documents and the web. It supports transparent backgrounds, and you can choose standard, 2×, 4× or slide-sized (1920 × 1080) output.
- JPEG: a smaller file with a solid background.
- SVG: a true vector file. It stays sharp at any size and can be edited in Illustrator, Inkscape or Figma.
- PDF: vector PDF sized to the chart, A4 or US Letter. If your labels use characters outside the standard PDF fonts (for example Chinese, Arabic or emoji), the PDF uses a high-resolution image instead and tells you.
- CSV and .json: your data, or the whole chart with its settings, to re-open later.
When to use a treemap
- Parts of a whole with many items, too many for a pie chart.
- Hierarchical data: budget by department and line item, or portfolio by sector and holding.
- Spotting the largest contributors at a glance.
When to choose a different chart
- Comparing items of similar size precisely. Areas are hard to compare, so use a bar graph.
- Values can be negative.
- Showing flows between categories. Use a Sankey diagram.
Common mistakes to avoid
Expecting exact comparisons
Rectangles of different shapes are hard to compare by area. Turn on values or percentages in labels.
Too many tiny items
Very small rectangles have no room for labels. Their details appear on hover and in the data table, or you can group them into “Other”.
Inconsistent group names
Groups are matched by exact name, so “Tech” and “Technology” become two separate groups.
Practical examples
Investment portfolio
Holdings grouped by sector, sized by market value, with percentages shown.
Departmental budget
Budget lines grouped by department to show where the money goes.
Disk usage
Folders and file types sized by megabytes.
Treemap layout algorithms
Squarified (Bruls, Huizing & van Wijk) tries to keep rectangles close to square, which makes them easier to compare and label. Binary splits the set recursively into balanced halves. Slice-and-dice alternates horizontal and vertical strips and preserves your input order, at the cost of long, thin rectangles. Whichever you choose, every rectangle’s area is proportional to its value.
Frequently asked questions
What is a treemap used for?
For showing how a total is divided among many items, often in a hierarchy, using rectangle area.
Can I have more than two levels?
This tool supports two levels (group and item), which covers most uses and keeps labels readable.
Can values be zero?
Zero values have no area and are skipped, with a warning.
How do I keep my own order?
Turn off “Sort largest first” and use the slice-and-dice layout.
Why are some labels missing?
Labels only appear where they fit. Hover over a rectangle or open the data table to see every item.
Your data stays private
Charts are drawn by your browser. Your data isn’t uploaded to our servers; it is kept only in this browser’s storage, for autosave and saved charts, until you clear it. See our privacy policy.