You have a map, a diagram or an infographic and need different zones of that image to lead to different links: each country to its page, each room in a floor plan to its description. Standard HTML solves this with the <map> tag, its <area> elements and the usemap attribute on the image. The image map generator on this site calculates the coordinates as you draw each zone, so you don't have to measure them by hand.
What an image map is, in short
An image map is an HTML image over which invisible clickable zones are defined, each with its own shape and its own link. The WHATWG image maps specification defines the rect, circle and poly shapes. One image file is enough; slicing the picture into several images means managing several files.
The three available zone shapes
- Rectangle (rect): four numbers in
coords(x1,y1,x2,y2). Good for buttons or square sections. - Circle: three numbers (
cx,cy,r). Useful for icons or points of interest. - Polygon (poly): at least six numbers, that is, three vertices (
x1,y1,x2,y2,x3,y3...). Needed for irregular outlines, such as a country's real border.
How to create an image map visually
- Upload the image with the "Upload image" button.
- Pick a shape (Rect, Circle or Polygon) and draw:
- Rectangle: click one corner, then the opposite corner.
- Circle: click the center, then a point on the edge. The radius is the distance between both clicks.
- Polygon: click each vertex and close it with a double click. You need at least three points.
- Assign a link in the "Edit area" panel, in the
href,altandtitlefields, then press Save. - Adjust with the zoom, from 50 % to 200 %. The Grid button snaps points to multiples of 10 pixels of the original image.
- Export as HTML or JSON, then copy or download the result.
You can do it free with the image map generator on this site.
Why drawing on the image avoids coordinate errors
Coordinates (for example, coords="34,44,270,350" for a rectangle) don't mean anything on their own: you have to work out where those pixels fall on the real image, and an error of a few pixels leaves the zone misaligned with the element it represents. When you draw on the image you see the result as you go, and the generator writes the coordinates for you.
Undo and the grid for complex zones
Polygons with many points usually need corrections. Undo and redo (the arrow buttons) revert any step, including link changes and deletions. The grid snaps every point to multiples of 10 pixels of the original image, which helps when you want zones to line up with each other.
Real use cases
- Interactive maps: each region or country leads to specific content.
- Building or event floor plans: each room or booth leads to its information.
- Infographics with several points of interest: each element links to a source or an expanded detail.
- Technical diagrams: each component links to its documentation.
Frequently asked questions
What formats can I export the result in? HTML or JSON. The HTML includes an <img> with the uploaded file name in src: change it to the real path of your image. The JSON contains shape, coords, href, alt and title for each zone.
Can I edit a zone after creating it? Yes. In Select mode, click the zone, change its fields and press Save.
Does it work well on screens of different sizes (responsive)? The coordinates match the image's natural size. If your CSS displays the image at another size, check that the zones still line up.
Is my image uploaded to any server? No. The generator opens the image in your browser and makes no network requests with it.
Create clickable zones on any image for free with the image map generator, with rectangles, circles, polygons and export to HTML or JSON.