Create custom map marker icons in a few clicks with the Marker Icon API Playground, our map marker icon generator:
- choose a pin shape, color and size;
- put an icon from Material Design, Font Awesome or Lucide inside, or your own text;
- copy the icon URL or download the PNG.
The generator is built on the Map Marker Icon API. On the Free plan you can generate up to 3,000 icons a day with attribution.
On this page
Create a Map Marker Icon with One URL
Every icon the generator makes is a URL of the Map Marker Icon API. The API works via HTTP GET requests and returns a PNG image:
https://api.geoapify.com/v2/icon/?type=material&color=%23e8590c&size=64&icon=coffee&iconType=awesome&apiKey=YOUR_API_KEYThe main parameters are:
| Parameter | What it sets | Example |
|---|---|---|
type | Marker shape: material, awesome, circle or plain | type=material |
size | Total height of the marker image, in pixels | size=64 |
color | Background color of the marker, URL-encoded | color=%23e8590c |
icon | Icon name from the chosen icon set | icon=coffee |
iconType | Icon set: material, awesome or lucide | iconType=awesome |
text | Text to show instead of an icon | text=12 |
contentSize, contentColor | Size in pixels and color of the icon or text | contentSize=28 |
noShadow, noWhiteCircle | Remove the shadow or the white circle (no value needed) | noShadow |
See all parameters in the Map Marker Icon API documentation.
Marker Shapes
The API gives you a choice of marker shapes: the Material Design pin (material), the Font Awesome pin (awesome), a circle, or plain, which draws only the icon without a background shape. You can draw the icon on a white circle or without it (noWhiteCircle). By default, pin markers have a shadow; remove it with the noShadow parameter.
Map Marker Icon Sizes in Pixels
Set the size in pixels: size is the height of the marker shape without the shadow, so size=64 gives a 64 px tall pin; the shadow adds a few pixels to the image. The icon or text inside gets a fixed default size that doesn't grow with size; for large markers, set its height explicitly with contentSize so the icon fills the pin.
Marker Colors, Stroke and Shadow
You can use any color that fits your project. Set the marker background with color, and the icon or text color with contentColor; for markers without a white circle, the icon color is adjusted automatically when you don't set it. You can also change the border with strokeColor and the shadow with shadowColor, and choose an outline width and one of six shadow styles. For example, make the shadow light instead of dark so the marker looks good on dark map styles.
Icon Sets: Material Design, Font Awesome and Lucide
With the Marker Icon API, you can use icons from open-source icon sets. Choose the set with iconType and specify the icon name in the URL:
- Material Design Icons:
iconType=material, available under the Apache License 2.0. - Font Awesome Free:
iconType=awesome, the icons are available under the CC BY 4.0 license and the icon font under the SIL OFL 1.1 license. - Lucide Icons:
iconType=lucide, available under the ISC license.
The API also supports Tabler, Phosphor, Material Symbols, and Material Design Icons, with matching pin shapes.
All these licenses allow use in commercial projects.
Marker Icon Text
Text is an alternative to an icon: set text, for example a number or a short label, and it replaces the icon. Define the text size with contentSize and add or remove the white circle.
Use the Icons on Your Map
A generated marker is a regular PNG image, so you can use it with any map library:
- Interactive maps: see how to use custom map marker icons in Google Maps, Leaflet, and MapLibre, with code for each library.
- Map images: the Static Maps API draws the same markers on a static map from their parameters.
- Self-hosting: download the PNGs and bundle them with your app, so your users load them from your server.
Read our article on how to create custom maps with pins.
FAQ
Is the map marker icon generator free?
Yes. On the Geoapify Free plan, you can generate up to 3,000 marker icons per day. Free plan users display the attribution "The map marker icons are generated with Geoapify." Paid plans with the White Label option remove this requirement. See the Map Marker Icon API page for details.
Can I download the icons and host them myself?
Yes. The generated map marker PNGs can be used directly via URL or downloaded and included in your projects without additional restrictions from Geoapify. Keep the attribution required by your plan.
Which icon libraries can I use?
Material Design Icons (iconType=material), Font Awesome Free (iconType=awesome) and Lucide Icons (iconType=lucide). You can also show text instead of an icon with the text parameter.
How do I use a generated marker in Leaflet or MapLibre?
Use the icon URL as the marker image: in Leaflet, pass it to L.icon(); in MapLibre GL, use it as the image of an HTML marker. See custom map marker icons in Google Maps, Leaflet, and MapLibre for complete code.
Do I need to credit the icon libraries?
Material Design icons don't require attribution under the Apache License 2.0. For Font Awesome icons, acknowledging the source is good practice under the OFL 1.1. On the Geoapify Free plan, the Geoapify attribution is required. See the Map Marker Icon API page.

Register and generate Map Marker Icons for Free
Get an API key and generate custom icons for your projects!
Learn more about the Map Marker Icon API >>
