Design & Charts

Image Map Generator

Load any image from your device, draw clickable areas on it and give each one a link and alt text. The HTML image map code is written for you as you draw, with exact pixel coordinates and an optional script that keeps the map working on responsive pages.

Free, runs in your browserUpdated October 2026

Image being mapped
Drop the image to load it
Clickable areas Click a number to select an area
Areas–
Image size–
HTML code

 

Image map generator diagram: rectangle, circle and polygon areas on an 800 by 500 floor plan become HTML area code
How the Image Map Generator works: Draw clickable areas on any image and copy clean HTML map code.

How to Use the Image Map Generator

How to use the image map generator: choose a shape, draw on the image, add links and copy the HTML map
Numbered steps on the Image Map Generator. Follow them in order.
  1. Pick Rectangle, Circle or Polygon, or Select to move and reshape areas.
  2. Draw on the image. Upload your own picture or drop it here first.
  3. Type the link and alt text for each area in the list.
  4. Set the image file name and a map name without spaces.
  5. Copy the generated HTML, with the optional responsive script if needed.
  1. Load your image. Press Upload image or drop a file on the canvas. The sample floor plan shows how a finished map looks. Your image never leaves your device, because it is opened locally by the browser.
  2. Pick a shape and draw. Rectangle and Circle work by dragging. For Polygon, click each corner, then click the first point, double-click or press Enter to close the shape.
  3. Fill in each area. Type the link and alt text in the list. Choose New tab if the link should open in a new browser tab.
  4. Adjust. Switch to Select to drag areas around or reshape them with the white handles. Select an area and press Delete to remove it.
  5. Copy the HTML and paste it where the image should appear. Upload the image itself next to the page, using the file name shown in the settings.

How HTML Image Map Code Works

An image map has two parts. The img element points to a map with the usemap attribute, and the map element holds one area element for each clickable region. The name on the map must match the text after the # in usemap.

<img src="plan.png" usemap="#plan" alt="..." width="800" height="500">
<map name="plan">
  <area shape="rect" coords="x1,y1,x2,y2" href="..." alt="...">
  <area shape="circle" coords="cx,cy,r" href="..." alt="...">
  <area shape="poly" coords="x1,y1,x2,y2,x3,y3,..." href="..." alt="...">
</map>

All coordinates are measured in pixels from the top-left corner of the image at its natural size. The rules are set out in the WHATWG HTML Standard section on image maps.

Shapecoords formatSample area
rectleft, top, right, bottom40,60,300,240 (Produce)
circlecenter x, center y, radius620,160,100 (Café)
polyx,y pairs for every corner460,300,760,300,760,460,600,460,600,400,460,400 (Checkout)

Worked Example

The Produce rectangle starts 40 pixels from the left and 60 pixels from the top, and ends at 300 and 240. It is 300 − 40 = 260 pixels wide and 240 − 60 = 180 pixels tall. If the 800 pixel wide image is shown at 400 pixels on a phone, every coordinate must be multiplied by 400 ÷ 800 = 0.5, so the area becomes 20,30,150,120. That is exactly what the optional responsive script does.

Making an Image Map Responsive

Area coordinates are fixed pixel values. They do not shrink when CSS makes the image smaller, so on a narrow screen the clickable regions drift away from the picture. Tick the Responsive option and the generated code adds max-width:100%;height:auto to the image plus a short script. The script stores the original coordinates and scales them by the displayed width divided by the natural width whenever the window is resized.

Accessibility and SEO Tips

  • Write alt text for every area that says where the link goes, such as Produce section, not Click here. Screen readers read area alt text as the link name.
  • Give the image its own alt text that describes the whole picture.
  • Offer a text alternative. For important navigation, repeat the links as a normal list near the image, so keyboard and mobile users have an easy route.
  • Keep areas large enough to tap. A region smaller than about 44 by 44 CSS pixels is hard to hit on a touch screen.

Common Uses for Clickable Images

Image maps suit pictures where position carries meaning: store and campus floor plans, regional maps, product diagrams with labelled parts, team photos that link to profiles and infographics. For layouts made of plain boxes, ordinary links positioned with CSS are easier to maintain. Image maps work in every current browser and need no JavaScript unless you add the responsive script.

If you edit the picture later, keep its pixel size the same and the coordinates stay valid. If you crop or resize the file, load the new version here and draw the areas again, because every coordinate is tied to the original pixel grid.

Frequently asked questions

What is an HTML image map?

An image map makes parts of one image clickable. The img element links to a map element with usemap, and each area element inside the map sets a shape, coordinates, a link and alt text.

How do I find the coordinates for an image map?

Draw the shape on your image in this generator and it reads the coordinates for you in the image's own pixels. Rectangles use left, top, right and bottom, circles use center and radius.

Why do my image map links not line up on mobile?

Area coordinates are fixed pixels, so they stop matching when the image is scaled down. Tick the Responsive option to add a small script that rescales the coordinates to the displayed image size.

Is my image uploaded to a server?

No. The image is opened locally by your browser with a temporary object URL. Nothing is sent anywhere, and the image disappears from the page as soon as you close or reload the tab.

Can an image map link open in a new tab?

Yes. Set the area's target to New tab and the generator adds target equals _blank with rel equals noopener, which opens the link in a new tab without giving that page access to yours.

Do image maps still work in modern browsers?

Yes. The map and area elements are part of the current HTML Standard and work in Chrome, Edge, Firefox and Safari. They need no plugins and work with the keyboard, because each area acts like a link.