Skip to content

Heatmap Maker

Paste a table of numbers — row names down the side, one column per variable — and get a heatmap with a colorblind-safe palette, a color bar and the value in every cell. Choose a sequential palette for amounts or a diverging one for data with a meaningful middle, pin the scale, and download the figure as SVG or PNG. It runs entirely in your browser — nothing is uploaded. Free, no sign-up.

One row per line: a name, then one number per column. A first line without numbers names the columns. Separate cells with commas, tabs or semicolons — use semicolons if your numbers have decimal commas. Leave a cell empty for a missing value.

4 rows · 5 columns

Viridis: Nathaniel Smith, Stéfan van der Walt and Eric Firing, released under CC0.

Color the cells by

One scale means the same color always stands for the same number. Scaling each row or column separately shows rank within it instead — use that when the rows or columns are in different units.

Auto uses the lowest and highest value. A diverging palette is centered on zero when the data cross zero, and on the median otherwise.

Mean Daily Study Hours by Course and WeekdayHeatmap of 4 rows by 5 columns. Highest value: 3.5, Statistics, Thu. Lowest value: 1, Chemistry, Fri.Mean Daily Study Hours by Course and WeekdayWeekdayCourseMonTueWedThuFriStatisticsChemistryHistoryLiterature2.5323.51.532.53.5211.522.53221.512.53.51.01.52.02.53.03.5
Show the data as a table
CourseMonTueWedThuFri
Statistics2.5323.51.5
Chemistry32.53.521
History1.522.532
Literature21.512.53.5

Labels and style

Takes the title out of the image and sets the figure number in bold and the title in italics above the chart — the APA 7 layout.

How to Use the Heatmap Maker

  1. 1. Paste your table. One row per line: a row name, then a number per column — Statistics, 2.5, 3, 2. A first line such as Course, Mon, Tue, Wed names the columns. Cells copied from a spreadsheet work as they are; with decimal commas, separate cells with semicolons. An empty cell is drawn as missing, never as zero.
  2. 2. Pick a palette. Viridis, Cividis and Blues are sequential, for amounts from low to high. Red–Blue and Orange–Purple are diverging, for data with a meaningful middle such as zero.
  3. 3. Set the scale. Leave it on automatic or pin the minimum and maximum — for a correlation matrix, −1 and 1 with the midpoint at 0. To compare rank within each row or column instead of size across the table, choose a per-row or per-column scale.
  4. 4. Label it and export. Add a title and axis titles, keep the values printed in the cells, and switch on APA style figure for a paper. Download the SVG (sharp at any size) or a PNG 1,280 pixels wide.

Choosing a Color Palette

The palette is the chart. The rule that matters most: color must change in lightness steadily from one end to the other, so a darker cell always means a higher (or lower) value, on any screen or printer and for any viewer.

PaletteTypeSource and licence
ViridisSequentialSmith, van der Walt and Firing; CC0
CividisSequentialNuñez, Anderton and Renslow (2018); Battelle Memorial Institute, BSD-style licence
BluesSequentialColorBrewer; Apache License 2.0
Red–Blue (RdBu)DivergingColorBrewer; Apache License 2.0
Orange–Purple (PuOr)DivergingColorBrewer; Apache License 2.0

Why not a rainbow? "Jet" and other rainbow ramps jump in lightness — yellow looks bright, blue and red look dark — so they invent bands that are not in the data, and several hues merge for readers with red–green color-vision deficiency. Viridis was designed to avoid this; cividis is optimized so the picture looks nearly the same with and without red–green deficiency; ColorBrewer rates RdBu and PuOr colorblind safe on colorbrewer2.org. The tests behind this tool check that each ramp changes steadily in lightness and that its two ends stay apart under simulated protanopia, deuteranopia and tritanopia. The two darkest ends of the diverging ramps are close in lightness, so keep the value labels on when you use them.

Sequential or Diverging?

  • Sequential — the data run one way, from little to much: hours studied, citations per paper, response counts.
  • Diverging — a point splits the data into two kinds of value: zero for a correlation or change score, a benchmark for a test, the neutral answer of a Likert item. The pale middle and two hues show which side a cell is on. Without a real midpoint, use a sequential palette — a pale center implies "no change".
  • The midpoint is a choice. Automatic centers the ramp on zero when your data cross zero and on the median when they do not. Type your own — a pass mark, say — and the two sides are scaled separately.

Honest Limits of Heatmaps

  • Color is a coarse code. People judge position and length far more accurately than color, so a heatmap shows patterns, not exact values. That is why the numbers are printed in the cells.
  • Scale choices change the picture. A narrow range makes small differences dramatic; one outlier can set the maximum and fade the rest. State the scale in your figure note, and pin it to compare several heatmaps.
  • Per-row or per-column scaling hides magnitude. A row varying from 10.0 to 10.2 looks as dramatic as one varying from 0 to 100. Use it for rank within a row or column, and say so.
  • Order is a choice. Rows and columns keep the order you enter them; nothing is clustered or reordered.
  • Value labels use whichever of near-black or white contrasts more with the cell — at least about 4:1 everywhere, a little short of WCAG's 4.5:1 for body text in a narrow band of mid-tones. Check a printed or projected figure with the Color Contrast Checker.

Heatmaps in an APA 7 Figure

APA style keeps the figure number and title in the paper's text. APA style figure removes the title from the image and sets the number in bold and the title in italic title case above it; Copy number and title copies both, formatted. Name the color scale in the Note. beneath the figure — what a color stands for, the palette, the range. See APA's figure setup guidelines, and check the figure with the Color Blindness Simulator.

Frequently Asked Questions

What is a heatmap used for?
A heatmap shows a table of numbers as a grid of colors, so patterns jump out: which rows and columns are high, where a trend changes, where values cluster. Typical uses are correlation matrices, activity by day and hour, survey scores by group and question, and confusion matrices. It shows pattern, not precision.
Which color palette is best for a colorblind-friendly heatmap?
Use a palette whose lightness changes steadily. Viridis is a good default; cividis is optimized for red–green color-vision deficiency. For data with a middle, ColorBrewer's RdBu and PuOr are rated colorblind safe. Avoid rainbow palettes and red–green pairs, and check the finished figure in a color blindness simulator.
How do I make a correlation matrix heatmap?
Paste the matrix with variable names down the side and across the top, choose Red–Blue, and set the scale minimum to −1, the midpoint to 0 and the maximum to 1. Pinning the scale makes a correlation of 0.5 the same color in every figure you make. The Correlation Matrix Calculator computes the matrix from raw data.
What is the difference between a sequential and a diverging palette?
A sequential palette runs from light to dark and suits values that go from low to high. A diverging palette has a pale middle and two different hues at the ends, and suits values on both sides of a meaningful point such as zero. Using one where there is no meaningful midpoint suggests a neutral value that does not exist.
What happens to empty or non-numeric cells?
They are drawn as pale cells with a diagonal line and counted as missing — never as zero, which would color them as a low value. A line with no number at all is left out, and the tool names the lines it skipped. The scale uses only the numbers present.

Related Tools

More in Charts & Diagrams

See all Charts & Diagrams