CSS image map generator
CSS image map generator — percentages instead of pixel coordinates.
Recreate a <map>/<area> image map with positioned CSS so the clickable regions scale with the image. Design it here, then hand-code it or publish a responsive embed.
Free forever plan · No credit card · Works in Wix, Webflow, WordPress, Shopify, Squarespace

Design your CSS image map visually
Upload your own image, click to place regions, and see exactly where each percentage coordinate lands. Publish it as a responsive embed with a free account.
This is a live demo — nothing here is published yet. Create a free account to publish your image and get a one-line embed code for Wix, Webflow, WordPress, Squarespace or plain HTML, with hosted images, images and video in the cards, CTA buttons and edits that go live instantly. Free includes 1 published image with the Interactive Image badge; Pro removes the badge and unlocks white-label embeds.
Percentage coordinates
Every region is placed as a percentage of the image box, so it survives any container width.
Real, focusable elements
Anchors and buttons instead of invisible <area> regions — keyboard and screen-reader friendly.
Visible affordances
Style regions and markers so visitors can actually tell what's clickable.
What you get
- Works with any fluid image at any aspect ratio
- No JavaScript resize library to keep in sync
- Convert an existing <area> map with two divisions
- Rect, circle, and clip-path polygon patterns covered below
- Publish popup cards, media, and an embed with a free account
The problem with the coordinates you already have
A legacy image map hard-codes pixels. Here is the pattern almost every old generator outputs:
<img src="plan.png" usemap="#rooms" width="1200" height="800">
<map name="rooms">
<area shape="rect" coords="120,80,340,260" href="/kitchen" alt="Kitchen">
<area shape="circle" coords="900,400,40" href="/patio" alt="Patio">
</map>Those numbers are only correct while the image is painted at exactly 1200×800. Put it in a fluid column, a card, or a phone viewport and the browser scales the picture while coords stays literal. The kitchen region ends up somewhere over the garden, and on a 390px phone most regions fall off the image entirely.
The CSS pattern that replaces it
Wrap the image in a relatively-positioned container and place each region absolutely, using percentages derived from the original coordinates:
<div class="imap">
<img src="plan.png" alt="Ground floor plan of the show home">
<!-- rect: centre 190,170 on a 1200x800 image -->
<a class="imap-hit" style="left:15.8%;top:21.3%;width:18.3%;height:22.5%"
href="/kitchen"><span>Kitchen</span></a>
<!-- circle: centre 900,400 -->
<a class="imap-dot" style="left:75%;top:50%"
href="/patio" aria-label="Patio"></a>
</div>.imap { position: relative; display: inline-block; max-width: 100%; }
.imap img { display: block; width: 100%; height: auto; }
/* Rectangular region — offsets and size are both percentages */
.imap-hit {
position: absolute;
border: 2px solid transparent;
border-radius: 4px;
}
.imap-hit:hover,
.imap-hit:focus-visible { border-color: currentColor; }
.imap-hit span { position: absolute; left: 0; bottom: 100%; }
/* Point marker — translate keeps the dot centred on its coordinate */
.imap-dot {
position: absolute;
width: 24px; height: 24px;
margin: -12px 0 0 -12px; /* or transform: translate(-50%, -50%) */
border-radius: 50%;
background: #111;
}
.imap-dot:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }Two details do most of the work. First, the image is display:block; width:100% so the container's box is exactly the image's box — any gap between them shows up as drift. Second, point markers are pulled back by half their own size (negative margins or translate(-50%,-50%)), so the coordinate lands at the marker's centre rather than its top-left corner.
Doing the conversion maths
Every percentage comes from the image's natural dimensions. With a 1200×800 image:
| Shape | Old coords | Maths | CSS |
|---|---|---|---|
| rect | 120,80,340,260 | left 120/1200, top 80/800, width (340−120)/1200, height (260−80)/800 | left 10%, top 10%, width 18.3%, height 22.5% |
| circle | 900,400,40 | centre is already given: 900/1200, 400/800 | left 75%, top 50%, border-radius 50% |
| poly | list of x,y pairs | divide each pair, then feed them to clip-path: polygon() | a full-bleed overlay with a percentage clip-path |
One caveat on radius: a circle's radius has no single percentage equivalent, because a percentage width and a percentage height scale differently unless the container is square. Either size the marker in pixels (fine — markers should stay tappable, not shrink to nothing on phones) or use aspect-ratio: 1 with a percentage width.
Where hand-written CSS starts costing you time
The markup above is genuinely enough for "make these five rectangles link somewhere". The work multiplies as soon as you want the things people actually ask for:
- Hover cards. A CSS-only tooltip breaks on touch devices, where there is no hover state. You need a click/tap toggle, and then a way to close it.
- Edge collision. A card anchored to a marker near the right edge will overflow the viewport unless you flip its side — that's measurement code, not CSS.
- Letterboxing. The moment the image is inside a container with
object-fit: contain, the painted image is smaller than its box and every percentage is measured against the wrong rectangle. See why hotspots drift on mobile. - Editing by non-developers. Every copy change becomes a code change and a deploy.
- Media in the card. Images and video mean hosting, sizing, and lazy-loading them yourself.
That's the honest boundary. Hand-code it when you need a handful of plain links. Publish an interactive image when you need cards, media, tap behaviour, and content your marketing team can edit without touching the template.
Related approaches
Compare the four options side by side in make an image clickable without an image map, read the HTML image map alternative overview, or start from the image map generator if you'd rather skip the markup entirely. For a purely responsive framing, see the responsive image map generator.
Turn any image into a guided experience.
Free forever plan. Paste one iframe into your site and ship.
Create your interactive image

