Heatmap maker

This heatmap maker turns a table of numbers into a clustered heatmap for a paper or poster: gene expression across samples, assay readouts across conditions, questionnaire scores across groups. Paste the table, choose row or column z-scores, cluster the rows and columns, and download an editable SVG or a 300 dpi PNG with the legend written for you.
Paste from Excel. Empty cells and NA count as missing.

Figure legend

To report

Heatmap of 32 rows by 11 columns. Colours show column z-scores (each column centred to mean 0 and scaled to SD 1). Rows and columns are ordered by hierarchical clustering (complete linkage, Euclidean distance).

Check your result: pick one cell and find it in your table. With “Z-score each row”, a value above its row’s mean is red and one below is blue; a row that is white all the way across had the same value in every column.
rows × columns per heatmap
300 × 80
rows × columns per heatmap
linkage methods
3
linkage methods
colour scales, none of them red–green
4
colour scales, none of them red–green
data uploaded
0
data uploaded
  • Row or column z-scores, or raw values
  • Hierarchical clustering with dendrograms
  • Complete, average or single linkage
  • Viridis and blue–white–red colour scales
  • Editable SVG and 300 dpi PNG

01

How to make a heatmap

  1. Paste your table, or open a CSV. Put the row names (genes, samples, compounds) in the first column and the column names in the first row. A block copied from Excel works as it is.
  2. Choose the scale. For expression data, z-score each row so every gene is compared on its own range; for variables measured in different units, z-score each column.
  3. Keep “Cluster rows” and “Cluster columns” on to group similar profiles, and pick the linkage and distance.
  4. Download the SVG to edit in Illustrator, Inkscape or PowerPoint, or the PNG for a manuscript, and copy the figure legend.

02

Row z-score, column z-score or raw values?

ScaleEach cell showsUse it for
Z-score each rowhow far a value is from its row’s mean, in standard deviationsgene or protein expression: which samples are high or low for each gene
Z-score each columnhow far a value is from its column’s meanvariables in different units, such as weight, age and a lab value
Nonethe number you entereddata already on one scale, such as percentages or correlations

z = (value − mean) ÷ SD

Without scaling, the variable with the biggest numbers takes over the colour range and the rest look flat. The SD is the sample SD, as in R’s scale(). Z-scores are centred on zero, so they are drawn with a blue–white–red scale where white means average.

03

Clustering and dendrograms

Hierarchical clustering joins the two most similar rows, then the next most similar pair or group, until everything is joined. The dendrogram records the order: rows joined by a short branch have similar profiles, and the height of a join is the distance at which the two groups merged.

ChoiceOptionWhat it does
DistanceEuclideancompares the values themselves; the default in R’s dist()
Distance1 − Pearson correlationcompares the shape of the profiles, ignoring their level; common for expression data
LinkageCompletedistance between groups is the largest pairwise distance; the default in R’s hclust()
LinkageAverage (UPGMA)the mean pairwise distance; less sensitive to single outliers
LinkageSinglethe smallest pairwise distance; tends to chain rows together

Clustering uses the values as they are drawn, after scaling. R’s base heatmap() clusters the unscaled values and only scales the colours, so its order can differ from this tool’s when the columns have very different ranges.

04

Choosing colours

  • Blue–white–red (ColorBrewer RdBu) for values centred on zero: z-scores, fold changes on a log scale, correlations.
  • Viridis for values that run from low to high: it changes evenly in lightness and stays readable in greyscale and for the common forms of colour blindness.
  • Avoid red–green scales: red–green colour blindness is the most common kind.
  • Missing values are grey with a diagonal stroke, not a colour.

05

The example data

The example is mtcars, the 32 cars by 11 measurements that ship with R in its datasets package. It is the data R’s own help page for heatmap() uses, with column scaling, so you can compare this tool’s output with R’s. Replace it with your own table: names in the first column, column names in the first row.

06

File formats

  • The SVG keeps every cell as a rectangle and every label as text, so you can recolour, rename or rearrange it in a vector editor.
  • The PNG is rendered at about 2,700 pixels wide, 9 inches at 300 dpi.
  • Up to 300 rows and 80 columns are drawn; labels are hidden when rows get too thin to read.

07

Why many heatmaps mislead

  • No scaling. In the mtcars example, engine displacement runs up to 472 and rear axle ratio up to 4.93. Coloured raw, displacement takes the whole colour range and the other ten columns look flat.
  • A diverging scale that is not centred. Blue–white–red only works when white means zero or average; this tool makes the scale symmetric around zero for z-scores.
  • Rainbow and red–green palettes. They change brightness unevenly and fail for the most common colour blindness; viridis and blue–white–red do not.
  • Clustering that silently differs. R’s base heatmap() clusters the unscaled values and scales only the colours; this tool clusters what it draws, and says so in the legend.
R’s mtcars data with column z-scores, rows and columns clustered (complete linkage, Euclidean distance). Small four-cylinder cars and large eight-cylinder cars form separate branches; without scaling, displacement (up to 472) would swamp rear axle ratio (up to 4.93).

Sources: R heatmap() documentation; mtcars in the R source.

Trust

How this page is checked

  • The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
  • Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.

Cite this page

Sciloom. (2026). Heatmap maker. Zebra Nine Studio Inc. https://sciloom.si/heatmap-maker

Read the full methodology · Who makes Sciloom

Frequently asked questions

How do I make a heatmap of gene expression?

Paste a table with genes as rows and samples as columns, choose “Z-score each row”, and cluster rows and columns. Use log-transformed values (for example log2 counts per million) rather than raw counts, so a few very high genes do not dominate.

Can I make a heatmap without clustering?

Yes. Untick “Cluster rows” and “Cluster columns” to keep the order of your table, for example time points or doses.

Can I make a correlation heatmap?

Yes. Paste a correlation matrix with the same names across the top and down the side, choose no scaling, and keep the blue–white–red colours so −1, 0 and 1 read at a glance.

Can I edit the heatmap afterwards?

Yes. Download the SVG and open it in Illustrator, Inkscape, Affinity Designer or PowerPoint. Each cell is a separate shape and each label is text.

Is my data uploaded?

No. The heatmap and the clustering are calculated in your browser, and a CSV you open is read on your computer.

Want the correlations behind a correlation heatmap? The correlation coefficient calculator gives r with its p value.
Free to start, no sign-up.
Back to the tool ↑

More research tools