Guides ·

How to convert KMZ to KML

Google Earth hands out KMZ files, but many programs, websites and scripts only read plain KML. The good news: a KMZ is just a KML in a zip. This guide shows what is inside one, three ways to get the KML out, and what each way keeps, using a small demo KMZ of the Giza pyramids.

Drop your KMZ into the free unmake KMZ to KML converter to see what is inside and download a checked KML.Try it on your own file
The unmake KMZ to KML converter with giza-pyramids-demo.kmz: four points and a square on the map, and the result giza-pyramids-demo.kml, 2.1 KB, with a Not carried over line for 2 icon images, the checks, and a link to the original doc.kml
giza-pyramids-demo.kmz in the KMZ to KML converter: the new KML, what it could not carry, and the original doc.kml. Demo file made by unmake, positions approximate; map © OpenStreetMap contributors.

A KMZ is a zipped KML

KML is a text format: placemarks, paths and areas written out in XML, a kind of tagged text you can read in any editor. A KMZ is a zip archive with a .kmz name. Google's KML documentation describes it as a main KML file plus zero or more supporting files, compressed with zip.

The main file is called doc.kml by default. The supporting files are usually icons, photos for the pop-up balloons, image overlays or 3D models, kept in a folder such as files/. The KML points to them with relative links like files/pyramid.png, which only work while the file and the folder stay together.

That is the point of a KMZ: one compact file that carries its own pictures. It is also why a program that expects text sees only a zip.

A KMZ is a zip file holding doc.kml and a files folder with images, here pyramid.png and sphinx.png, which doc.kml links to
Inside giza-pyramids-demo.kmz: doc.kml and a files folder with the two icons it links to.

Way 1: rename it and unzip it

Make a copy of the .kmz, change the ending to .zip and open it with your computer's normal unzip tool. You get doc.kml and any folders of images, exactly as they were packed.

This keeps everything, byte for byte. Keep doc.kml and its folders side by side, and zip them again to send them on. If you cannot see the .kmz ending, turn on file name extensions first, or you may end up with map.zip.kmz.

Way 2: save it again from Google Earth Pro

If you have Google Earth Pro on a computer, open the KMZ, right-click it in the Places panel, choose Save Place As and pick KML as the file type.

This is handy when you want to tidy up first: rename placemarks, delete a folder or save one part of a big file.

Way 3: convert it in the browser

The unmake KMZ to KML converter opens the KMZ in your browser, shows the placemarks on a map and lists what is inside the zip; each file in the list can be saved on its own.

Convert to KML writes the KMZ's own KML: folders, styles, descriptions and data stay. Pictures cannot go inside a KML, so the result names them on a Not carried over line, and a link saves the original doc.kml unchanged. Before you download, the tool reads its new file back and compares features, coordinates and attribute values with the KMZ.

Details for giza-pyramids-demo.kmz in the converter: KMZ, 1.9 KB, 4 points, 1 polygon, 13.07 acres, and Inside the KMZ: doc.kml 2.2 KB, files/pyramid.png 389 B, files/sphinx.png 459 B
Details lists every file inside the KMZ; each name saves that file. Demo file made by unmake; map © OpenStreetMap contributors.

KMZ files that convert to nothing

Some KMZ files hold no placemarks at all. A ground overlay KMZ is a picture, such as an old map or a drone photo, pinned to four corners on the globe. A network link KMZ is a bookmark: it tells Google Earth to fetch the real data from a server, so the zip itself is almost empty.

In both cases there is nothing to turn into placemarks. Unzip the overlay to get the image, or open the network link's address to find the data it loads.

A KMZ can also contain more than one .kml file. Google advises keeping only one, because a program cannot know which to read first; the unmake converter's page says it reads the first.

When plain KML is the better choice

Choose KML when a program accepts only KML, when you want to edit the XML in a text editor, or when you keep map files in version control and want to see what changed.

Stay with KMZ when the icons and images matter, or when you send the file to someone who will open it in Google Earth.

Converting KMZ to KML keeps placemarks and data, folders, styles and descriptions; the icon images stay in the KMZ, listed and saved one by one
What the converted KML keeps, and what only the KMZ can hold. Unzipping keeps everything.

A worked example: the Giza pyramids demo KMZ

  1. Our demo file giza-pyramids-demo.kmz is 1,901 bytes. Inside are doc.kml (2,279 bytes, packed down to 713), files/pyramid.png and files/sphinx.png: two icons we drew, one for the three pyramids and one for the Great Sphinx.
  2. doc.kml holds four points with approximate positions, a 230 m square drawn round the Great Pyramid, a folder called Monuments, and a pharaoh and a kind field on every placemark.
  3. Drop it into the KMZ to KML converter. The panel reads 5 features: 4 points and 1 polygon, 13.07 acres. Details says KMZ, 1.9 KB, WGS 84, and gives the square's area as 13.07 acres (5.29 ha), which is 230 m times 230 m.
  4. On the map, every placemark is a plain blue dot. Under the summary the panel says Inside the KMZ: doc.kml + 2 images, and Details lists doc.kml (2.2 KB), files/pyramid.png (389 B) and files/sphinx.png (459 B), each a link that saves that file.
  5. Press Convert to KML. The result, giza-pyramids-demo.kml, 2.1 KB, has no green tick. It starts with a warning, Not carried over: 2 icon images (files/pyramid.png, files/sphinx.png), then three checks: 5 features, all 9 coordinates (largest difference 0.000 m) and 15 of 15 attribute values.
  6. Open the new 2,194-byte file in a text editor: the document's name and description, the three styles, the Monuments folder and the pharaoh and kind fields are all there; only the icon links are gone. Download the original doc.kml (unchanged) gives back the 2,279-byte file with its links.

Common mistakes

Questions

Is a KMZ just a zipped KML?

Yes: a main KML file, called doc.kml by default, plus any images or other files it uses, packed with zip.

Why is my KMZ so much smaller than the KML inside?

Zip compresses text well. Our demo's 2,279-byte doc.kml takes 713 bytes inside the KMZ.

Does converting KMZ to KML lose anything?

Unzipping loses nothing. The unmake converter keeps placemarks, data, folders, styles and descriptions; only the icon images stay in the KMZ, listed so you can save each one.

Is my KMZ uploaded when I convert it?

No. The page opens the file in your browser and it stays on your device unless you share it.

Sample file: giza-pyramids-demo.kmz (demo with our own icons, positions approximate) · ours (made by unmake)

Sources

Drop your KMZ into the free unmake KMZ to KML converter to see what is inside and download a checked KML.Try it on your own file