A key for your map: rows of colour swatches, lines or dots with labels, a title, and a picture of it to download.
How to use it
Give the legend a title.
Add rows: choose a symbol, a colour and a label for each.
Choose light or dark and the size.
Download the legend as PNG or SVG.
5 practical uses
Make a key for a screenshot of a map that has none.
Add a legend to a slide, a poster or a report figure.
Explain the colours of a painted or a pinned map.
Make a consistent legend for a set of maps.
Produce an SVG legend to edit in a design tool.
The maths behind it
The legend is laid out as an SVG: each row is a symbol and a text placed at a fixed row height, and the width is measured from the text lengths with a canvas font metric. The PNG is the same SVG drawn onto a canvas at twice the size for a sharp image.
Making a good legend
Order the rows as the reader will look for them: highest to lowest for numbers, most to least common for categories.
Say the unit in the title or the labels ("Population, thousands"), not in every row.
For a value ramp, keep to five or six classes; more are hard to tell apart. The state and county map tools make their own legends.
To place it on a slide, a document or a printed map that has no legend of its own. The state and county map tools make their own legends.
How many rows should a legend have?
Five or six for a colour ramp; more are hard to tell apart. Categories can have more if the colours differ clearly.
Can I edit the SVG?
Yes. The SVG opens in Inkscape, Illustrator or Figma, where you can change fonts, colours and spacing.
Embed this tool on your website
Paste this code where the tool should appear. It shows the tool alone, without this page's text, and links back here. It is free to use; the map data credit stays on the map.
Change height to suit your page. To open the tool with a place already set, add the settings from this page's address bar (the part after #) to the end of the src. The embedded tool asks the visitor's browser for their location only when they press the button, and the allow attribute lets that work inside the frame.