Home › Developer Tools › HTML Image Map Generator

HTML Image Map Generator

Turn any picture into a clickable image map. Draw rectangles, circles and polygons over the parts you want to link, add a URL and alt text to each hotspot, and copy classic <map> HTML, a responsive version with a tiny script, or a modern SVG image map.

Last updated:

Image to map

Hotspots 0

No hotspots yet. Pick a tool and draw on the image.


    
Import an existing <map>
Advertisement
Advertisement

How to use the HTML Image Map Generator

  1. Choose or drop an image and type the path it will have on your site (for example images/floor-plan.jpg).
  2. Pick a tool: Rectangle and Circle work by dragging; Polygon adds a point per click and finishes when you click the first point, double-click or press Enter.
  3. Fill in each hotspot in the list: link URL, alt text and an optional tooltip, and choose whether it opens in a new tab.
  4. Adjust with the Select tool: drag shapes to move them and drag the square handles to resize or reshape.
  5. Copy the code in the format you need, or download a demo page and put your image next to it.

Image map shapes and coordinates

shapecoords formatExampleTypical use
rectleft, top, right, bottom60,60,320,240Buttons, buildings, rooms on a floor plan
circlecenter x, center y, radius610,160,105Pins, round icons, planets, wheels
polyx1,y1, x2,y2, … (3 or more corners)470,395,560,370,700,410Countries, states, irregular objects
defaultno coords<area shape="default" href="/">Fallback link for the rest of the image (add by hand)

When areas overlap, the browser uses the first matching <area> in the map, so put small shapes before large ones. The hotspot numbers in the editor show that order.

A minimal image map

<img src="map.png" alt="Town map" usemap="#town" width="800" height="500">
<map name="town">
  <area shape="rect" coords="60,60,320,240" href="/library" alt="Library">
  <area shape="circle" coords="610,160,105" href="/park" alt="Park">
</map>

The value of usemap is the map's name with a leading #. Setting width and height to the image's real size keeps the coordinates correct and prevents layout shift.

Tips

  • Draw at the image's final size: if you later crop or resize the picture, the coordinates must be redone or scaled.
  • Make hotspots at least about 44 × 44 CSS pixels so they are easy to tap on phones.
  • Give users a visual hint that the image is clickable, such as labels or a short caption, because map areas are invisible by default.
  • Keep the list of links available as normal text too, for search engines and assistive technology.

Frequently asked questions

What is an HTML image map?

An image map lets different regions of one image link to different pages. The <img> tag gets a usemap attribute that points to a <map> element, and each <area> inside the map defines a clickable shape with its own href, alt text and coordinates.

How do area coordinates work?

Coordinates are in pixels of the original image, measured from its top-left corner. A rectangle uses x1,y1,x2,y2 (two opposite corners), a circle uses x,y,radius, and a polygon lists every corner as x1,y1,x2,y2,x3,y3 and so on.

Why does my image map stop working when the image is resized?

Area coordinates are fixed pixel values, so when CSS scales the image (for example max-width: 100%) the clickable regions no longer line up. Use the Responsive output, which recalculates the coordinates whenever the image size changes, or the SVG version, which scales naturally.

Should I use the classic map or the SVG version?

The classic map has worked in every browser for decades and is simple to paste. The SVG version scales without JavaScript, can show hover highlights with CSS and makes each hotspot a normal focusable link, which is nicer for keyboard users. Both are fine for most sites.

Are image maps accessible?

They can be. Give every area meaningful alt text describing where the link goes, give the image itself an alt text, and make sure important links are also available as normal text links somewhere on the page, because small hotspots can be hard to hit on touch screens.

Is my image uploaded to a server?

No. The image is opened locally with your browser and only displayed on this page. Only the code you copy contains the file name you typed, not the image itself.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

HTML Table GeneratorBuild HTML tables in an editable grid with styles, header rows, CSV import and live preview.HTML Form BuilderDrag and drop form fields with labels and validation, then copy accessible HTML and CSS code.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.CSS Hover Effects GeneratorPick button, link and image hover effects, tweak colors and timing, and copy the HTML and CSS.Open Graph PreviewPaste OG tags and preview how links look on Facebook, X and LinkedIn.YouTube Embed Code GeneratorCreate responsive YouTube embed code with start time, autoplay, loop and privacy mode.CSS Box Shadow GeneratorDesign layered CSS box shadows with a live preview, presets and one-click Copy CSS.CSS Border Radius GeneratorRound each corner, draw elliptical 8-value radii or random blob shapes and copy the CSS.CSS Button GeneratorDesign CSS buttons with gradients, borders, shadows and hover and active states, then copy the code.CSS Flexbox GeneratorBuild flexbox layouts visually: set container and item properties, then copy the CSS and HTML.Twitter Card GeneratorCreate X / Twitter Card meta tags with Open Graph fallbacks, character counters and a live preview.CSS Grid GeneratorDraw CSS grid layouts: set tracks and gaps, drag to name areas, then copy the CSS and HTML.PX to REM ConverterConvert px to rem or em and back, with a 1-100px table and a whole-CSS converter.Glassmorphism CSS GeneratorDesign frosted-glass UI cards with blur, transparency and border sliders, then copy the CSS.CSS Text Shadow GeneratorLayer CSS text shadows with a live preview and neon, 3D, outline and retro presets.HTML Editor (Live Preview)Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type.HTML to JSX ConverterConvert HTML to valid React JSX: className, htmlFor, style objects, self-closing tags and events.CSS Clip-Path GeneratorDraw CSS clip-path shapes by dragging points: polygons, circle, ellipse and inset. Copy the CSS.CSS Animation GeneratorCreate CSS keyframe animations from 23 presets with live preview, timing controls and Copy CSS.CSS Triangle GeneratorMake CSS triangles in 8 directions with the border trick or clip-path. Set size and color, copy CSS.CSS Loader GeneratorPick from 14 pure CSS spinners and loaders, set color, size and speed, then copy the HTML and CSS.Cubic Bezier GeneratorDrag the control points to design a CSS easing curve, compare it with linear and copy cubic-bezier().CSS Filter GeneratorAdjust blur, brightness, contrast, hue, sepia and drop-shadow on an image and copy the CSS filter.CSS Specificity CalculatorCalculate CSS selector specificity (a, b, c), including :is(), :not(), :has() and :where(), and compare.Google Maps Embed GeneratorTurn an address or coordinates into responsive Google Maps iframe embed code, no API key.Neumorphism CSS GeneratorDesign soft UI neumorphic shapes with live preview and copy the box-shadow CSS.SVG Wave GeneratorMake layered SVG waves for section dividers and export SVG, PNG or a CSS background.SVG Blob GeneratorGenerate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path.CSS Clamp GeneratorTurn min/max sizes and viewport widths into a fluid CSS clamp() value in rem and vw.CSS @font-face GeneratorTurn font files or URLs into ready-to-paste @font-face rules with weights, styles and a preview.CSS Media Query GeneratorBuild @media rules for widths, orientation, dark mode and hover, or get framework breakpoints.CSS Scrollbar GeneratorStyle scrollbars: width, colors, radius and hover, with ::-webkit-scrollbar and scrollbar-color CSS.CSS Sprite GeneratorPack many icons into one sprite sheet PNG and get CSS classes with background-position.CSS Text Gradient GeneratorMake gradient text with background-clip:text: color stops, angle, font preview and fallback CSS.CSS Toggle Switch GeneratorDesign pure-CSS toggle switches: size, colors, shape and animation. Copy accessible HTML + CSS.CSS Tooltip GeneratorBuild pure CSS tooltips: position, arrow, colors, padding and animation. Copy HTML and CSS.Iframe GeneratorCreate iframe embed code: size or responsive ratio, border, allow, sandbox, lazy load, live preview.PX to VW ConverterConvert pixels to vw and vh for any viewport size, and vw/vh back to px, with breakpoint tables.SVG Path EditorEdit an SVG path d attribute visually: drag points, edit commands, convert, scale and minify.SVG to CSS Data URITurn SVG code into a small URL-encoded data URI for CSS backgrounds, with Base64 size comparison.SVG to JSXTurn SVG code into a clean React component: camelCase attributes, style objects, TypeScript.Tailwind CSS Cheat SheetSearchable Tailwind class to CSS reference with live previews, class decoder and color palette.Web App Manifest GeneratorCreate a PWA manifest.json and every app icon size from one image, downloaded as a ZIP.CSS Background Pattern GeneratorMake pure-CSS stripes, dots, checkerboard, zigzag and grid backgrounds and copy the code.CSS Color Filter GeneratorTurn a HEX color into a CSS filter that recolors black icons and SVGs, with an accuracy score.CSS Gradient Animation GeneratorCreate animated gradient backgrounds: pick colors, angle and speed, preview live and copy the CSS.CSS InlinerMove CSS from style blocks into inline style attributes so HTML emails render in every client.CSS Shape Divider GeneratorCreate wave, tilt, curve and triangle section dividers and copy the SVG, HTML and CSS.CSS Transform GeneratorRotate, scale, skew and translate an element with sliders and copy the CSS transform code.Font Pairing ToolPreview Google Font heading and body pairs on real layouts and copy the embed code and CSS.HTML Accessibility CheckerPaste HTML to find WCAG accessibility problems with impact level, the failing element and a fix.SVG ViewerOpen or paste SVG code to preview it live with zoom, backgrounds, size info and PNG export.Pathfinding VisualizerAnimate BFS, DFS, Dijkstra, A* and greedy search on a grid with walls, weights and mazes.
See all 52 Web, HTML & CSS Tools →