Convert GeoJSON to KMZ
This converter turns a GeoJSON file into a KMZ for Google Earth and Google My Maps: a zip with the KML stored as doc.kml, every property kept as placemark data and the name field of your choice. The file is converted in your browser and is not uploaded. Colors from geojson.io and Mapbox (marker-color, stroke, fill) become KML styles, nested values are written as JSON text, and a GeoJSON in another coordinate system is reprojected to WGS84.
Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.
Key facts
- Input: GeoJSON (.geojson). Output: KMZ (.kmz).
- Your files are not uploaded: the work is done in your browser, on your own device.
- File size: no fixed limit; very large files are limited by your device's memory.
- Needs a current browser (Chrome, Edge, Firefox or Safari) on a computer, tablet or phone; nothing to install.
- Free to use, with no sign-up.
GeoJSON to KMZ: why convert
GeoJSON is what web maps, APIs, geojson.io and scripts produce, while Google Earth saves and expects KMZ: a compressed KML that is often five to ten times smaller than the same data as text. That matters when a route network, parcel layer or survey result has to go by e-mail, into a chat or up to a portal with a size limit. This page writes the KML from your GeoJSON with GDAL, the open-source library behind QGIS, and packs it as doc.kml in a KMZ, directly in your browser. Points, lines and polygons can stay together in one file, every property comes along as data on the placemark, and you choose which one becomes the label in Google Earth.
How to convert GeoJSON to KMZ
- Drop your .geojson or .json file in the box, or click to choose it.
- Choose the property to use for placemark names, or keep Automatic.
- Click Convert to KMZ and open the file in Google Earth or import it into My Maps.
What changes when you convert
KMZ or KML?
The content is the same: a KMZ is a zip with the KML inside as doc.kml. Google Earth, Google My Maps, QGIS and ArcGIS open both. Choose KMZ for a smaller file to send or upload; choose KML if you want to open the file in a text editor or a program that only reads plain KML, or use the GeoJSON to KML converter.
Colors from geojson.io become KML styles
Properties such as marker-color, marker-size, stroke, stroke-width, stroke-opacity, fill and fill-opacity (the simplestyle convention used by geojson.io and Mapbox) become a KML style on each placemark: a tinted pushpin for points, a colored line for lines, and outline plus fill for polygons. Missing values use the simplestyle defaults. Maki icons from marker-symbol are not carried over, and features without color properties get Google Earth's standard pushpin or a red outline. The properties are also kept as data fields.
Names and descriptions
A property called name becomes the placemark name automatically; otherwise a property with name, title or label in it is used, and you can choose any other, or No names. A property called description becomes the balloon text, and HTML in it is shown as formatted text in Google Earth.
Nested values
KML data fields are flat. Nested objects and arrays, common in API responses, are written as JSON text, which Google Earth shows as it is. Dates and times are kept exactly as they are written.
GeoJSON in other coordinate systems
KML is always longitude and latitude on WGS84. A GeoJSON written before RFC 7946 with a "crs" member (a national grid, for example) is reprojected from it. A file without "crs" whose coordinates are clearly meters, such as an export from a projected QGIS project, is not taken as WGS84: the page asks for its coordinate system and suggests the ones that fit.
About the formats
GeoJSON
GeoJSON is a plain-text JSON format for geographic features, standardized as RFC 7946 in 2016. It is the native format of web maps such as Leaflet, MapLibre and Mapbox, and of many APIs.
- Coordinates are WGS84 longitude, latitude (in that order).
- Points, lines and polygons can be mixed in one file.
- Properties can be any JSON value, with no limit on field name length.
KMZ
KMZ is a zipped KML file, often with icons and images packed alongside it. Google Earth saves KMZ by default, so it is the format most people get when they export from Google Earth.
- The main file inside the zip is usually doc.kml.
- Images and icons inside the KMZ are not geodata, so they are left out when converting to formats such as GeoJSON or Shapefile.
Frequently asked questions
Will the KMZ open in Google My Maps?
Yes. Add a layer in My Maps, click Import and choose the KMZ. The placemark name becomes the title, and the other properties appear in the details.
Why is the KMZ so much smaller than the GeoJSON?
KML text compresses very well. The coordinates and property names repeat for every feature, and the zip inside the KMZ stores that repetition only once.
Can I convert several GeoJSON files into one KMZ?
This page converts one GeoJSON file at a time, and it becomes one folder in the KMZ. To combine layers in one KMZ, merge them in QGIS first or open the KMZ files together in Google Earth.
Is my GeoJSON uploaded?
No. GDAL runs in your browser and the KMZ is written on your own computer. Nothing is sent to a server.
Can I convert the KMZ back to GeoJSON?
Yes, with the KMZ to GeoJSON converter. The placemark data comes back as properties, and the KML styles as simplestyle colors.