If you have ever exported something from Google Earth you have run into both extensions, often without being told which one you got. The short answer: a KMZ file is a ZIP archive that contains a KML file. Everything else follows from that single fact. This guide covers what each one actually holds, when the difference matters, and how to move between them.
The Short Answer
| KML | KMZ | |
|---|---|---|
| What it is | A plain-text XML file | A ZIP archive containing a KML, plus optional assets |
| Readable in a text editor | Yes | No — it is compressed binary |
| Can bundle images and icons | No, only links to them | Yes |
| Typical size for the same data | Baseline | Often 5–10x smaller |
| Google Earth default export | No | Yes |
| Best for | Editing, diffing, version control, tools that require plain XML | Sharing, emailing, anything with custom icons or overlays |
What Is a KML File?
KML stands for Keyhole Markup Language, an XML-based format standardised by the Open Geospatial Consortium in 2008. It describes points, lines, polygons, ground overlays, and the styling applied to each. Because it is plain text, you can open a .kml in any text editor and read exactly what it contains:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Placemark>
<name>Eiffel Tower</name>
<Point><coordinates>2.2945,48.8584,0</coordinates></Point>
</Placemark>
</Document>
</kml>
For a deeper walkthrough of the elements, geometry types, and styling model, see the full guide to the KML file format.
What Is a KMZ File?
KMZ is that same KML, ZIP-compressed. Rename any .kmz to .zip, open it, and you will find a file — conventionally named doc.kml — sitting at the root. Alongside it there may be a files/ or images/ folder holding custom placemark icons, ground overlay images, or 3D model textures that the KML references by relative path.
That bundling is the entire reason KMZ exists. A KML that uses a custom pin icon can only link to that image. Send the KML on its own and the recipient sees broken icons, or nothing at all if the link pointed at a local file. A KMZ carries the images with it.
File Size: Where the Difference Is Dramatic
XML is verbose and highly repetitive — the same tag names appear on every single placemark — which is exactly the pattern ZIP compression handles best. A KML with a few thousand placemarks routinely compresses to under a tenth of its original size.
This matters more than it sounds. Email attachment limits, Google My Maps import caps, and mobile data budgets are all real constraints that a large KML runs into and its KMZ equivalent does not.
Compatibility: Which One Do Tools Accept?
Google Earth, Google My Maps, QGIS, and ArcGIS all read both formats without complaint. The gap shows up in narrower tooling:
- Web mapping libraries — Leaflet and OpenLayers KML plugins parse XML, not archives. They need plain KML.
- Command-line and scripting tools — many expect a text stream, so a KMZ has to be unzipped first.
- Online converters — a good number only accept
.kml, which is the most common reason people need to convert KMZ to KML at all. - Version control — Git can diff a KML line by line. A KMZ is opaque binary; every change looks like a whole-file replacement.
Every KML tool on GeoDataTools accepts .kmz directly and unzips it in your browser, so this particular problem does not arise here.
Which Should You Use?
Choose KML when you need to read or hand-edit the XML, run it through a validator or a script, commit it to a repository, or feed it to a web mapping library. Plain text is easier to inspect, and being able to see exactly what changed is worth more than a smaller file during development.
Choose KMZ when you are sharing the file with someone else, when it uses custom icons, photo overlays, or ground overlays that must travel with it, or when the file is large enough that size becomes a practical problem. It is also simply what Google Earth produces by default, so it is the format most recipients already expect.
Converting Between Them
Both directions are lossless — nothing is added or removed, only compressed or decompressed.
- KMZ to KML: use the KMZ to KML converter. It opens the archive in your browser, lists what is inside, and extracts the KML. Renaming the file to
.zipand unzipping it manually reaches the same result. - KML to KMZ: use the KML to KMZ converter. It packages your KML as
doc.kmlinside a compressed archive, matching the layout Google Earth expects.
If your goal is not really KML at all but getting the data into a GIS or web stack, convert straight to the target format instead: KML/KMZ to GeoJSON, KML to Shapefile (SHP), or KML to CSV. Each accepts KMZ directly, so there is no reason to unzip first.
Just Want to See What Is in the File?
Before converting anything, it is often worth confirming the file actually holds what you expect. The KML viewer opens both .kml and .kmz on an interactive map with no install and no signup, which is usually faster than launching Google Earth for a quick check.
FAQ
What is the difference between KML and KMZ?
KML is a plain-text XML file describing geographic features. KMZ is a ZIP archive containing a KML file (usually doc.kml) plus any images, icons, or overlays it references. The geographic data itself is identical.
Is KMZ better than KML?
Neither is better in general. KMZ is smaller and bundles assets, which makes it better for sharing. KML is plain text, which makes it better for editing, scripting, validation, and version control.
Can I open a KMZ file without Google Earth?
Yes. QGIS and ArcGIS open KMZ directly, and browser-based viewers such as the GeoDataTools KML viewer display .kmz files without any install.
Can I just rename a .kmz file to .zip?
Yes. A KMZ is a standard ZIP archive, so renaming the extension to .zip and unzipping it gives you the KML inside, along with any bundled images.
Does converting KML to KMZ lose any data?
No. ZIP compression is lossless, so every placemark, coordinate, style, and ExtendedData field is preserved exactly.
Why does Google Earth save as KMZ by default?
Because KMZ is smaller and keeps any custom icons or overlay images bundled with the geometry, so a single file is enough to share the complete map.
Ready to work with your geospatial data?
Visualize, filter, and convert GeoJSON and KML files directly in your browser.
Try GeoDataTools