Back to all posts

Convert Google My Maps to GeoJSON

You paste your My Maps link into the app, or export the map as KML and convert it to GeoJSON here for web maps built with Leaflet, Mapbox or OpenLayers, and for GIS work in QGIS.

Google My Maps does not export GeoJSON. It exports KML, the Google format. The quickest route is to paste your My Maps link into the app, which imports the map for you when it is public or shared by link. If your map is private, export it as KML first, then convert that KML below. The converter runs in your browser, so your data stays on your device.

Faster: paste your My Maps link

How to convert My Maps to GeoJSON (3 steps)

  1. Open your map: go to mymaps.google.com and open the map you want.
  2. Export to KML: click the three dots next to the map title, choose Export to KML/KMZ, tick “Export to a .KML file”, then Download.
  3. Convert it here: drop the KML into the converter below and download your GeoJSON.

How the geometry converts

Your pins become Point features, drawn lines become LineStrings and shapes become Polygons. Names and descriptions move into feature properties, and the whole map comes out as a standard FeatureCollection that loads straight into a mapping library. KML styling such as icon graphics and 3D camera views has no GeoJSON equivalent and is dropped, since GeoJSON describes geometry and properties rather than appearance.

If your map is public

For a public or link-shared map the quickest option is to paste the map link into the app, as above. If you want the KML file itself you can skip the menu and download it directly. Take the mid value from your map’s URL and open:

https://www.google.com/maps/d/kml?mid=YOUR_MAP_ID&forcekml=1

The forcekml=1 part returns plain KML rather than a zipped KMZ, so you can drop it straight into the converter. This only works for maps that are public or shared by link.

What My Maps cannot do

Google My Maps allows up to 10 layers per map and 2,000 features per layer, to a total of 10,000 features across a map. There is no bulk export across several maps and no direct GeoJSON output, which is why the KML route above is the practical one.

Need a different format?

The same KML export converts to other formats too. For a spreadsheet in Excel or Google Sheets use Google My Maps to CSV. For GPS devices and hiking apps use Google My Maps to GPX. For the full walkthrough of the export step, read the KML export guide.


Frequently Asked Questions

Does Google My Maps export to GeoJSON?

Not from My Maps itself: it exports KML and KMZ only. You have two routes to GeoJSON. Paste your My Maps link into the app and it imports the map, then exports GeoJSON, which works for maps that are public or shared by link. For a private map, export it as KML and convert the KML to GeoJSON with the converter above, in your browser.

Which libraries use GeoJSON?

GeoJSON is the web-native format for Leaflet, Mapbox GL, OpenLayers and D3, and it loads directly into GIS tools like QGIS and spatial databases like PostGIS.

How does the geometry convert?

Points become Point features, drawn lines become LineStrings and shapes become Polygons. Names and descriptions become feature properties. The output is a standard FeatureCollection.

Is my map uploaded anywhere?

No. The conversion runs entirely in your browser, so your KML file never leaves your device.

My map is public. Is there a shortcut?

Yes. The quickest route is to paste your My Maps link into the app, which imports the map and lets you export GeoJSON. This works for maps that are public or shared by link. If you would rather work from a file, download the KML straight from https://www.google.com/maps/d/kml?mid=YOUR_MAP_ID&forcekml=1, replacing YOUR_MAP_ID with the mid value from your map's URL, then drop that KML into the converter above. Private maps have no public link, so use the Export to KML steps for those.


Learn more

Convert Google My Maps to GeoJSON - Free Online | Takeout Tools