Your image stays in your browser. Nothing is uploaded.
🗺️
Open an image to start
Drop a PNG, JPG, GIF, WebP or SVG here, paste one with Ctrl+V, or pick a file. It stays in your browser.
This is your code running. Hover or Tab to an area to see its outline. Clicks are caught here, so nothing opens.
Area 1
Drag a white dot on the outline to add a corner. Double-click (or double-tap) a corner to remove it.
Draw an area on the image, or pick one from the list to edit its link and alt text.
Areas
Where areas overlap, the one higher in the list wins. Tab goes through them in this order too.
Add without drawing:
Image
No image yet
PNG, JPG, GIF, WebP or SVG, up to 20 MB. You can also drop a file on the image box or paste one with Ctrl+V. A
picked file stays in your browser. An image URL is only shown in an image tag, the same way your page will.
Where the image will be on your site, like images/plan.png. Your picked file isn't put in the code.
Used as usemap="#image-map" and <map name="image-map">. Letters, digits, - and _.
px
For a sharp 2x image, type half its width. All coordinates are scaled to match.
Image maps don't shrink with the image. This adds a small script that rescales the areas when the image is shown
smaller, plus max-width: 100% on the image. Try it with Preview at phone width.
HTML Image Map Generator: Make Clickable Areas on an Image
What Is an HTML Image Map?
An image map turns one picture into several links. Each part of the image (a room on a floor plan, a country on a
map, a person in a group photo) gets its own clickable area that opens its own page. You don’t cut the image into
pieces: the picture stays whole, and a <map> next to it lists the clickable shapes.
The sample floor plan with its six areas outlined. In a real page the outlines are invisible, but each room is a link.
<imgsrc="office.png"usemap="#office"alt="Floor plan of our office"width="800"height="520"><mapname="office"><areashape="rect"coords="20,20,300,220"href="/office/reception"alt="Reception"><areashape="circle"coords="655,398,56"href="/office/phone-pod"alt="Phone pod"><areashape="poly"coords="260,290,780,290,780,500,520,500,520,400,260,400"href="/office/lounge"alt="Lounge"></map>
The usemap="#office" on the image points at <map name="office">. Inside the map, each
<area> has a shape, its coordinates in pixels, a link in href and alt text. This
generator writes all of it for you while you draw on your own image, in your browser.
How to Make an Image Map, Step by Step
Five steps. Your areas are remembered, so you can come back to them later.
Step 1 Open Your Image
Press Open an image, drop a file on the box, or paste one with Ctrl+V. PNG,
JPG, GIF, WebP and SVG all work, up to 20 MB. You can also use an image address that starts with https://, or
press Sample to try the floor plan first. A picked file is never uploaded.
Step 2 Draw the Areas
Pick a tool above the image. With Rectangle, drag from one corner to the other. With
Circle, drag from the middle outward. With Polygon, click each corner in turn,
then click the first corner again (or double-click, or press Enter) to close the shape. On a phone,
tap the corners and press Finish shape.
Step 3 Adjust Them
With Select, drag an area to move it and drag the small squares to resize it. On a polygon, drag
a corner to move it, drag a white dot between two corners to add one, and double-click a corner to remove it.
Arrow keys nudge the selected area by 1 pixel (10 with Shift), Delete removes it and
Ctrl+Z undoes. You can also type exact coordinates in the area’s settings.
Step 4 Add a Link and Alt Text to Each Area
Pick an area and type where it goes (a page on your site like /office/kitchen or a full
https:// address) and its alt text, like “Kitchen”. A title is optional: it shows as a small tooltip
when someone hovers with a mouse. Use the arrows in the list to change the order.
Step 5 Check It and Copy the Code
Open the Preview tab to try the real code: hover or Tab through the areas to see their
outlines, and click one to see which link it would open. Then set the image address and alt text under
Image and code, and press Copy or Download .html.
💡 Your image file isn’t inside the code. Upload it to your site and make sure the src in the code
points to it, like images/office.png.
When Should You Use an Image Map?
Image maps are old (they’ve worked in every browser since the 1990s) and still the simplest way to put links on
parts of a picture. They aren’t always the best choice, though.
A good fit
A photo, scan or screenshot with a few clickable spots (a floor plan, a team photo, a product with parts)
A map picture where each region links to its own page
You already have the image and just want links on it
Better as SVG
The picture is a simple drawing you could redraw as shapes
You want hover colors or animation on each part
It has to scale on every screen with no script
Better as plain links
The parts could be separate pictures, cards or buttons
There’s text in the picture that should really be text people can select and translate
It’s a menu: a normal list of links is easier for everyone
Image Map Coordinates Explained
Every number is a distance in pixels from the top-left corner of the image: x goes right, y goes down. Here’s a
small 200 × 120 image with one area of each shape:
rect: left, top, right, bottom. 20,20,90,70 is 70 wide and 50 tall.
circle: center x, center y, radius. 140,45,25 is 50 px across.
poly: the x,y of every corner, in order around the shape. The last corner joins back to the first.
The numbers belong to the size the image is shown at. This tool measures in the image’s own pixels and writes
width and height on the <img> to match. If you show a sharp 2x image at
half its size, type that width in Width in the code and every coordinate is halved for you.
Image Maps on Phones
Here’s the catch with image maps: the coordinates don’t scale. If your CSS has max-width: 100% and a
phone shows your 800 px image at 360 px, the areas stay where they were for 800 px and the clicks land in the wrong
rooms. Switch on Responsive and the code gets this small script, which rescales the areas whenever
the image changes size:
<script>
// Image maps don't scale with the image. This keeps the areas lined up when the
// image is shown at another size than the 800 px it was mapped at.
(() => {
const name = "office";
const map = document.querySelector('map[name="' + name + '"]');
const img = document.querySelector('img[usemap="#' + name + '"]');
if (!map || !img) return;
const areas = [...map.areas];
const start = areas.map((a) => a.coords.split(',').map(Number));
const fit = () => {
const k = img.clientWidth / 800;
if (!k) return;
areas.forEach((a, i) => {
a.coords = start[i].map((n) => Math.round(n * k)).join(',');
});
};
if (window.ResizeObserver) new ResizeObserver(fit).observe(img);
else window.addEventListener('resize', fit);
img.addEventListener('load', fit);
fit();
})();
</script>
It only runs on your page and needs JavaScript. Without it, the areas still work at the full size. Try both in the
Preview tab with the width set to Phone. If the image is a simple drawing, an SVG
with links scales without any script; see “When should you use an image map?” above.
Make Your Image Map Accessible
Alt text on every area with a link. Screen readers read it as the link’s name, so say where it
goes: “Kitchen”, not “area 3” or “click here”. The generator warns you when one is missing.
Alt text on the image too, describing the whole picture, like “Floor plan of our office”.
A sensible order.Tab moves through the areas in the order of the
<area> tags. Use the arrows in the area list to put them in reading order.
Big enough to tap. Keep each area at least 24 × 24 pixels so fingers can hit it.
Don’t hide important links only in the picture. People can’t see where the areas are until they
hover, so add a short list of the same links under the image if they matter.
Common Image Map Mistakes
What’s in the code
What to do
usemap="plan"
It needs the #: usemap="#plan".
usemap="#Plan" with name="plan"
The names must match exactly, capital letters included.
Coordinates for an 800 px image shown at 400 px
The areas end up twice as big. Map the size you show, or turn on Responsive.
coords="10%,20%,50%,60%"
Browsers ignore percentages here. Use pixels.
<area href="/kitchen"> with no alt
Screen readers can’t say where the link goes. Add alt="Kitchen".
<!-- Doesn't work: no # in usemap, and the names don't match -->
<imgsrc="plan.png"usemap="Plan"><mapname="plan"> … </map>
<!-- Works -->
<imgsrc="plan.png"usemap="#plan"><mapname="plan"> … </map>
What This Tool Can’t Do
It doesn’t upload or host your image. Put it on your site yourself and set its address in the code.
It doesn’t check that your links work. Open them once after you publish.
Curved shapes need a polygon with many corners. There’s no ellipse shape in HTML, only rectangles, circles and
polygons.
A shape="default" area (the whole image) and coordinates in percent aren’t supported. When you import
code that has them, they’re left out and you’re told.
Images bigger than about 700 KB aren’t kept after a reload. Your areas are, so just open the image again.
It’s one picture with several clickable parts, each with its own link. Think of a floor plan where every room opens its own page, or a map where each country is a link. In HTML it’s an <img> with a usemap attribute, plus a <map> that lists the clickable areas as <area> tags. Each area has a shape (rect, circle or poly), coordinates, a link in href and alt text.
How do I make an image map in HTML?
Open your image in the generator, pick Rectangle, Circle or Polygon and draw over each part people should click. Give every area a link and alt text, then copy the code. It looks like <img src="plan.png" usemap="#plan" alt="Floor plan"> followed by <map name="plan"><area shape="rect" coords="20,20,300,220" href="/reception" alt="Reception"></map>. Paste both into your page and put the image where the src points.
What do the coords numbers mean?
They’re pixels, counted from the top-left corner of the image. A rectangle has four numbers: left, top, right, bottom, so coords="20,20,300,220" starts 20 px in and 20 px down and ends at 300 by 220. A circle has three: the center x, center y and the radius. A polygon lists the x,y of every corner in order, like 260,290,780,290,780,500. The generator works them out while you draw.
Are image maps responsive?
Not by themselves. The coordinates are fixed pixels, so when CSS shows the image smaller (for example max-width: 100% on a phone), the areas stay big and miss their spots. Turn on Responsive in the generator: it adds max-width: 100% to the image and a small script that rescales the coordinates whenever the image changes size. Check it in the Preview tab at phone width.
Why is my image map not working?
The most common causes: usemap is missing the # (it must be usemap="#plan" for <map name="plan">), the names don’t match exactly (they’re case-sensitive), or the image is shown at a different size than the coordinates were made for. If CSS or a width attribute shrinks the image, the areas end up in the wrong place. Set Width in the code to the size you show it at, or turn on Responsive.
Are image maps accessible?
They can be. Every area with a link needs alt text that says where it goes, like alt="Kitchen", because screen readers read it as the link’s name. The image itself needs alt text too. Keyboard users reach the areas with Tab, in the order of the <area> tags, so list them in a sensible order. Make the areas big enough to tap: at least 24 × 24 pixels. The generator warns you about missing alt text and small areas.
Should I use an image map or SVG?
An image map is quick when you already have a picture (a photo, a scanned plan, a screenshot) and want a few clickable spots. If the shapes are simple drawings, an inline SVG with <a> links around each shape scales by itself and is easier to style, for example with a hover color. And if the parts can just be separate pictures or buttons in a row, plain links are simpler still.
Can I edit an image map I already have?
Yes. Press Import code and paste your <img> and <map> HTML. The areas, links, alt text and map name are loaded so you can move, resize or add areas. Nothing in the code runs. If you already have an image open, the areas go on that one. If not, and the image address in the code is a full https:// address, your browser loads that picture to show under the areas, the same way a page would; otherwise you get a gray stand-in until you open the image yourself. Code made for a bigger copy of the image is scaled to fit.
Is my image uploaded anywhere?
No. A picked or pasted image is shown straight from your device in your browser. If it’s under about 700 KB, a copy is kept in your browser’s local storage so it’s still there after a reload; bigger images aren’t kept, but your areas are. If you use an image URL, your browser loads it in an image tag like any page would.