KMZ to GeoJSON Converter
Upload a Google Earth KMZ and download one GeoJSON FeatureCollection built from the KML inside it, including KML files it links to within the archive. The folder tree is flattened, and icons, photos and overlay images stay behind.
Download Started!
How would you rate your experience with MiConvert?
From a zipped Google Earth file to GeoJSON
A KMZ is a ZIP archive with one or more KML documents inside, often bundled with the icons and images they reference. Google Earth opens it directly, but Leaflet, Mapbox GL, OpenLayers and most web APIs expect GeoJSON, so the archive has to be unzipped and its XML translated before the data is usable in code.
Both steps happen on our server. The archive is identified by its ZIP signature rather than its file name, and 7-Zip extracts only the .kml files, from any folder depth. The main document is doc.kml at the root if present, otherwise the first root-level KML, otherwise the least deeply nested one. NetworkLinks pointing to other KML files in the same archive are followed, up to 2,000 files, while links to web addresses are never fetched. The open-source toGeoJSON library then builds the output, and the temporary extraction folder is deleted.
Positions keep altitude as a third coordinate. Properties carry each placemark's name, description, ExtendedData values and style details (styleUrl, icon-color, icon-opacity). A gx:Track becomes a LineString with its per-point times in coordinateProperties.times, MultiGeometry becomes a GeometryCollection, and a GroundOverlay is reduced to its footprint polygon, marked with an @geometry-type property of groundoverlay.
What does not survive: the folder hierarchy, which is flattened into a single list of features; the pictures packed in the archive, such as overlay images, custom icons and 3D models; and number types, because ExtendedData values are written as strings.
It serves developers putting Google Earth content on a web map, analysts moving client data into QGIS, and anyone about to write a Python script for one file. For other targets there are our KMZ to SHP, CSV, GPX and KML converters. Shapefile attribute names are cut to 8 characters, CSV keeps point placemarks only, GPX drops track times, and KMZ to KML returns the main KML file without the icons, images or linked KML files packed beside it.
How to convert KMZ to GeoJSON
- Not sure what the KMZ holds? Copy it, rename the copy to .zip and look inside. There must be at least one .kml file, at any folder level.
- Make sure the features are stored in the file. Layers that Google Earth loads from a web address are not downloaded during conversion.
- Upload the .kmz. Guests can send files up to 50 MB, and a free account raises the limit to 100 MB per file.
- Convert and download the .geojson file when the job finishes.
- Load the file in Leaflet, Mapbox GL, QGIS or your own code, filtering on @geometry-type if you want to drop overlay footprints.
What the converter handles inside a KMZ
- Finds KML files in nested folders and in any letter case, and accepts a plain KML that was saved with a .kmz extension.
- Follows NetworkLinks between KML files inside the archive, up to 2,000 linked files.
- Keeps altitude, when the KML stores it, as the third value of each coordinate.
- Keeps gx:Track timestamps in coordinateProperties.times.
- Stores styleUrl, icon-color and icon-opacity as properties you can map to your own symbols.
- Reads UTF-16 and BOM-prefixed files, strips stray control characters and repairs MAPS.ME's undeclared prefixes.
KMZ to GeoJSON questions
Will the GeoJSON load in Leaflet, Mapbox or OpenLayers?
Yes. The file is a single FeatureCollection with positions in longitude, latitude, altitude order, which these libraries read directly. Two things to watch: multi-part placemarks arrive as GeometryCollection, which some styling code skips, and overlay footprints look like ordinary polygons unless you filter on @geometry-type.
Are my Google Earth folders kept?
No. Every placemark ends up in one flat list. If the grouping matters, save each folder from Google Earth Pro as its own KMZ and convert them separately, or record the group in an ExtendedData field before exporting.
Do icons, photos and image overlays come through?
No. Only KML documents are extracted from the archive, so custom icons, embedded photos, overlay images and 3D models are left out. Each GroundOverlay still appears as a polygon showing where its image would sit.
Why do my numeric attributes come out as text?
ExtendedData values are written as strings, even ones that look like numbers. Convert them after loading, for example with Number() in JavaScript or with the Refactor Fields tool in QGIS.
Can I convert KMZ to GeoJSON in Python or QGIS instead?
You can. A KMZ is an ordinary ZIP, so Python's zipfile module extracts the KML, and GDAL's ogr2ogr or QGIS can then save it as GeoJSON; opening the .kmz directly depends on your GDAL build including the LIBKML driver. For a single file, uploading here skips that setup and also follows links between the KML files in the archive.
Google Earth shows layers that are missing from my GeoJSON. Why?
Those layers are most likely loaded through NetworkLinks that point to a web server. The converter never fetches remote links, so only features stored inside the archive are converted. Ask the map's publisher for a copy with the data embedded, or download the source layers directly.
What does "No KML file found inside the KMZ archive" mean?
The archive opened but contains no .kml document, which happens when another program reuses the .kmz name for a different kind of ZIP. Check the contents as described in the steps. If you see "Processing failed. The file may be corrupt or unsupported." instead, the archive could not be opened at all, so export it again from the original application.
What happens to my KMZ after conversion?
It is processed on our servers. The uploaded archive and the folder it was unpacked into are deleted when the job completes. The GeoJSON stays downloadable for about 4 hours, then it is removed. The link is not limited to one download, so anyone holding it can fetch the file until then, and file names, sizes and outcomes are logged.