Convert a file
Home › Guides › KML vs KMZ: what's the difference?

KML vs KMZ: what's the difference?

KML is a plain text file, and KMZ is that same file zipped. That is the whole KML vs KMZ answer: the difference is compression, not content. This guide explains when each one makes sense and how to switch between them.

Key facts

  • A KMZ is a ZIP-compressed KML: in a 10,000-point test the 5.18 MB KML compressed to 0.33 MB, about 16 times smaller.
  • Both formats are always WGS84 (EPSG:4326) longitude/latitude by the Google Earth specification.
  • KML is plain XML you can edit in a text editor; KMZ bundles the KML plus icons and overlays into one file.

KML and KMZ side by side

Both formats hold the same map data and Google Earth opens both, so the differences sit in packaging rather than content. The size gap is real, though: in the site's 10,000-point test the 5.18 MB KML became a 0.33 MB KMZ, about 16 times smaller, because XML repeats its tags on every placemark and that repetition compresses well.

KML vs KMZ: KML is a plain text file, KMZ is a zipped KML with icons
The same data in both formats, but KMZ is the zipped, smaller version.
KMLKMZ
What it isPlain XML textA ZIP archive with a KML inside, usually doc.kml
Size, same 10,000 points5.18 MB0.33 MB
Open in a text editorYesNo, unzip it first
Carries icons and imagesNoYes, bundled in the archive
Coordinate systemWGS84WGS84
Opens in Google EarthYesYes

When to use KML

Pick KML when you expect to edit the file: tweak a style, fix a typo in a label, correct a coordinate. KML stands for Keyhole Markup Language and is plain XML, so any editor can open it, and the OGC KML standard has the detail on the format itself. Developers and analysts often prefer it for exactly that reason.

When to use KMZ

Pick KMZ when you want to share a finished map. The recipient gets one small file, custom icons stay attached because the archive bundles them, and Google Earth exports KMZ by default for exactly that reason.

The rule

The rule fits in six words: KML to edit, KMZ to send. A working file is handier as plain text, and a finished file is neater as one compressed package. Nothing is lost by switching, because the compression does not touch the data, so you can move between the two whenever the job changes.

How to switch

One converter covers both directions: drop a KML onto KML to KMZ to shrink it before sharing, or drop a KMZ on the same page to get an editable KML back. A KMZ you only need to view can stay as it is, since Google Earth opens it directly. Either format can also go to a Shapefile or to GeoJSON for GIS work, and the whole decision still comes down to edit versus send.

“If you are emailing a Google Earth file, send the KMZ. It is the same data an order of magnitude smaller, and it keeps the icons and overlays with it.”
Ghulam Hasnain, PhD researcher in Space Science & Technology and the maker of GISConverters

Frequently asked questions

What does KML stand for?

Keyhole Markup Language, named for the company whose software became Google Earth. It is an XML format, and the OGC KML standard documents it in full.

Can I unzip a KMZ myself?

Yes. A KMZ is an ordinary ZIP archive, so rename it to .zip and extract the doc.kml inside, along with any icons and images the archive carries.

Does popup data survive a conversion to a shapefile?

Yes. A good converter lifts the popup and ExtendedData attributes into proper columns during the conversion, so the table arrives ready to use in GIS.

What is the difference between KML and KMZ?

KML is a plain XML text file. KMZ is that same KML compressed into a ZIP archive, which can also bundle icons and images. They hold the same map data, but KMZ is smaller and easier to share.

Can Google Earth open both KML and KMZ?

Yes. Google Earth opens both formats directly, on desktop and on the web. KMZ is preferred for sharing because it is smaller and keeps custom icons attached.

About the author

Ghulam Hasnain is a PhD researcher in space science and technology who works with GIS and remote-sensing data every day, wrangling shapefiles, KML, GPX and CAD drawings across QGIS, ArcGIS and Google Earth. He built GISConverters after one too many format conversions that required uploading sensitive survey data to a stranger's server.