Skip to content

Image Map Generator

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.

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:

    Your image map code

    <img src="image.png" usemap="#image-map" alt="">
    
    <map name="image-map">
    </map>

      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.
      <img src="office.png" usemap="#office" alt="Floor plan of our office" width="800" height="520">
      
      <map name="office">
        <area shape="rect" coords="20,20,300,220" href="/office/reception" alt="Reception">
        <area shape="circle" coords="655,398,56" href="/office/phone-pod" alt="Phone pod">
        <area shape="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:

      0,0 x → y ↓ 20,20 90,70 140,45 r 25 4 corners
      <area shape="rect" coords="20,20,90,70" href="/a" alt="Rectangle">
      <area shape="circle" coords="140,45,25" href="/b" alt="Circle">
      <area shape="poly" coords="20,90,110,90,110,110,60,110" href="/c" alt="Polygon">
      • 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

      Common Image Map Mistakes

      What’s in the codeWhat 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 -->
      <img src="plan.png" usemap="Plan">
      <map name="plan"> … </map>
      
      <!-- Works -->
      <img src="plan.png" usemap="#plan">
      <map name="plan"> … </map>

      What This Tool Can’t Do

      More tools for the same page: make the links themselves with the HTML Link Generator, serve the right image size with the Responsive Image Generator, check your alt text with the HTML Accessibility Checker, or paste your finished page into the HTML Viewer to see it.

      Frequently Asked Questions

      What is an HTML image map?

      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.