Image Map Generator
An image map turns parts of one picture into separate links. Load an image, drag to draw rectangles or circles, click points for polygons, and type a link and alt text for each area. Copy the classic map and area HTML, or a responsive SVG version whose areas shrink with the image on phones.
| shape | coords | Meaning |
|---|---|---|
| rect | x1,y1,x2,y2 | Top left and bottom right corners |
| circle | x,y,r | Centre and radius |
| poly | x1,y1,x2,y2,... | Each corner in order; the shape closes itself |
| default | (none) | Everything not covered by another area |
Updated
Floor plans, product diagrams, team photos and maps often need several links inside one picture. Drawing the areas by eye is far quicker than measuring pixels, and your image never leaves your computer: it is read in the browser and only its size is used in the code.
Draw your areas
Draw rectangles, circles and polygons on the sample floor plan or your own image, then set a link and alt text for each area.
Code for the sample floor plan
These are the two outputs the generator writes for the four sample areas.
Classic map and area
Works everywhere at the image's natural size of 600 by 360 pixels.
<img src="floor-plan.png" width="600" height="360" usemap="#floor-plan" alt="Shop floor plan" />
<map name="floor-plan">
<area shape="rect" coords="20,20,280,170" href="/showroom" alt="Showroom" />
<area shape="rect" coords="300,20,580,170" href="/workshop" alt="Workshop" />
<area shape="circle" coords="150,265,70" href="/cafe" alt="Cafe" />
<area shape="poly" coords="300,190,580,190,580,340,400,340" href="/garden" alt="Garden" />
</map>Responsive SVG links
The viewBox matches the image size, so every link shape scales with the picture.
<svg viewBox="0 0 600 360" role="img" aria-label="Shop floor plan" style="width:100%;height:auto;display:block">
<image href="floor-plan.png" width="600" height="360" />
<g fill="transparent">
<a href="/showroom" aria-label="Showroom"><rect x="20" y="20" width="260" height="150" /></a>
<a href="/workshop" aria-label="Workshop"><rect x="300" y="20" width="280" height="150" /></a>
<a href="/cafe" aria-label="Cafe"><circle cx="150" cy="265" r="70" /></a>
<a href="/garden" aria-label="Garden"><polygon points="300,190 580,190 580,340 400,340" /></a>
</g>
</svg>
Classic map or SVG links
The map and area pair has worked in browsers for decades and keeps the image as a normal img, which is simple for content tools. Its weakness is fixed coordinates.
The SVG version draws the image inside an svg element and wraps each shape in a link. Because everything shares one viewBox, the areas scale perfectly, and you can add a hover outline with CSS on the shapes.
Accessible clickable images
Give the image itself alt text describing the whole picture, and each area alt text naming its destination. Keyboard users can tab through areas in source order, so list them in a sensible reading order.
Test by tabbing through the result. If the focus order jumps around the picture, reorder the rows in the list before copying.
How it works
- Use the sample floor plan or choose your own image file. The coordinates are measured in the image's real pixels, even when the preview is scaled down.
- Choose Rectangle or Circle and drag on the image, or choose Polygon, click each corner, then press Finish polygon.
- Edit each area's link, alt text and coordinates in the list. Typed coordinates update the drawing, which also lets keyboard users build a map.
- Copy the classic HTML or the responsive SVG. Replace the image path in the code with where the file will live on your site.
Tips
- Every area with an href needs alt text. It is what screen readers announce, so write the destination, such as Book a cafe table.
- Classic image map coordinates are fixed CSS pixels. If CSS shrinks the image on phones, the areas stay where they were, so use the SVG output for fluid layouts.
- Keep clickable regions large enough to tap comfortably, and avoid areas that touch with no gap.
- Do not hide the only route to a page inside an image. Repeat important links as normal text somewhere nearby.
Frequently asked questions
How do I connect the map to the image?
Give the map a name, then set usemap on the img to the same name with a # in front, for example usemap="#site-map" and map name="site-map". The generator writes both for you.
Are HTML image maps responsive?
Not on their own. Coordinates are numbers of CSS pixels, so they do not follow an image that CSS resizes. The SVG output solves this with a viewBox, which scales the picture and the link shapes together.
Is my image uploaded?
No. The file is opened with a local object URL so the browser can show it and read its width and height. Nothing is sent to We.Inc or anyone else.
Can areas overlap?
They can. Where two areas overlap, the one listed first in the map wins the click, so put smaller areas before larger ones that surround them.
Related: HTML images guide, Image cropper, Placeholder image generator, Embed a Google Map, HTML embed code generator.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Free Tools
- Image to Base64 and SVG to Data URI
- Invoice Due Date Calculator
- Invoice Generator | Free Tool
- Invoice Late Fee Calculator
- IP WHOIS Lookup
- JavaScript Formatter
- JavaScript Minifier
- JSON Diff Checker
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App