Convert KML to KMZ

This tool packs a KML file into a KMZ, the zipped form Google Earth uses, with the KML stored unchanged as doc.kml. Choose the icons, photos or overlay images the KML points to together with it, and they are packed at the paths the KML expects, so the KMZ shows them on any computer. Everything happens in your browser and nothing is uploaded.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

KML to KMZ: why convert

A KML that uses its own icons, photos in the placemark balloons or a scanned map as a ground overlay refers to those images by file path. Send the KML on its own and the other person sees blank icons and missing pictures. A KMZ solves that: it is a zip with the KML as doc.kml and the images inside, and Google Earth, Google My Maps and most GIS programs open it directly. It is also much smaller, because KML text compresses well. This page builds the KMZ in your browser. Choose the KML and the images it uses at the same time; the page reads every link in the KML, packs the files it finds and tells you which are missing.

How to convert KML to KMZ

  1. Drop your .kml file in the box together with the icons and images it uses, or click to choose them.
  2. Check the placemarks on the map.
  3. Click Create KMZ and download the file.

What changes when you convert

Choose the images together with the KML

A browser can only read the files you choose; it cannot follow a path such as files/icon.png on its own. Select the KML and its images in one go, for example with Ctrl or Cmd held down, or drop them all at once. Files are matched by name, so it does not matter which folder they are in on your computer. Images the KML does not mention are left out, and the message lists links whose files were not found.

Paths stay as they are

A relative link such as files/icon.png or images/photo 1.jpg is kept, and the file is placed at exactly that path inside the KMZ, so the KML is stored byte for byte as you gave it. Links to a full path on your computer, such as C:\Users\Anna\Pictures\pin.png, would not work anywhere else; they are changed to files/pin.png, as Google Earth Pro does when it saves a KMZ.

Web links are not downloaded

Icons from the web, such as Google's standard pushpins, and network links to online KML keep working as long as the address is online. They are not copied into the KMZ, so a KMZ that relies on them still needs an internet connection.

Several KML files

If you choose more than one KML, the one that no other chosen KML links to becomes doc.kml, and KML files it links to through a network link are packed next to it. A KML that nothing links to is left out; to combine unrelated KML files, convert them one at a time or merge them in Google Earth first.

3D models and overlays

COLLADA models (.dae) and ground overlay images are packed like icons when you choose them. Textures that a model loads itself are not read from inside the .dae, so choose those image files too. The map preview here only draws placemarks, paths and polygons.

About the formats

KML

KML (Keyhole Markup Language) is the XML format behind Google Earth and Google My Maps, and an OGC standard since 2008. Besides geometry it can hold styles, icons, folders and descriptions in HTML.

  • Always WGS84 longitude, latitude and optional altitude.
  • Folders group placemarks; each folder can become its own layer when converting.
  • Styles (colors, line widths, icons) are specific to KML and Google Earth.

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

What is the difference between KML and KMZ?

A KMZ is a zip file that holds a KML, usually called doc.kml, and optionally images and models. The geographic content is the same; KMZ is smaller and can carry its own icons.

Will Google Earth open the KMZ?

Yes. Google Earth Pro, Google Earth on the web and Google My Maps open KMZ files, as do QGIS and ArcGIS Pro.

Can I just zip the KML and rename it?

Yes, if the KML is called doc.kml and the images are at the paths it uses. This page does that for you, checks the paths and fixes links to full paths on your computer.

Is my KML uploaded?

No. The KMZ is built by your browser on your own computer. Nothing is sent to a server.

How do I get the KML back out?

Use the KMZ to KML converter, which extracts the KML unchanged together with the packed files.