KML vs KMZ

A KMZ file is a KML file packed in a ZIP archive, often with the images and icons it uses. The data is the same. Use KMZ to send a file with its pictures or to make it smaller, and KML to read or edit the text.

Open either format in the KML viewer or the KMZ viewer. It runs in your browser, and the file never leaves your device.

What KML and KMZ files can store

DataKMLKMZ
Recorded tracksYesYes
More than one trackYesYes
Track segmentsYesAs a MultiGeometryYesAs a MultiGeometry
Planned routesYesWritten as lines, read back as tracksYesWritten as lines, read back as tracks
WaypointsYesAs Point placemarksYesAs Point placemarks
File name and titleYesYes
DescriptionYesYes
AuthorNoNo
Creation timeNoNo
LinksNoNo
Track namesYesYes
Activity typeNoNo
ElevationYesYes
TimestampsYesOnly in gx:TrackYesOnly in gx:Track
Heart rateWith an extensionExtendedData in gx:TrackWith an extensionExtendedData in gx:Track
CadenceWith an extensionExtendedData in gx:TrackWith an extensionExtendedData in gx:Track
PowerWith an extensionExtendedData in gx:TrackWith an extensionExtendedData in gx:Track
TemperatureWith an extensionExtendedData in gx:TrackWith an extensionExtendedData in gx:Track
SpeedWith an extensionExtendedData in gx:TrackWith an extensionExtendedData in gx:Track

This table comes from the code of TrackLoupe, and the notes say how each field is stored. The converters use the same table to tell you what a conversion keeps and what it loses.

What changes between KML and KMZ

Difference KML KMZ
What it is XML text A ZIP archive with a KML file inside
Size Full size Often about 10 times smaller
Images and icons Only links to them Can carry them inside the archive
Editing Any text editor Unpack first

The table of fields above is the same for both, because a KMZ holds a KML document.

Google’s KML documentation recommends KMZ once the KML is larger than 10 KB, and for files that use images or other supporting files.

How to turn a KMZ into a KML

  1. Make a copy of the KMZ file.
  2. Change the extension of the copy to .zip.
  3. Unpack it. The KML document is the .kml file at the top level, usually doc.kml.

How to turn a KML into a KMZ

  1. Put the KML file, named doc.kml, in a folder with any images it uses.
  2. Select the contents of the folder and compress them into a ZIP archive.
  3. Rename the archive from .zip to .kmz.

Keep a single KML file at the top level. Google Earth reads the first one it finds there and ignores the others.

In TrackLoupe

The KML viewer and the KMZ viewer open both formats in your browser. A KMZ is unpacked on your device, and its first KML document is opened.

Questions

Does Google My Maps accept KMZ?

Yes. My Maps imports KML and KMZ files when the unpacked content is up to 5 MB.

Why is my KMZ file larger than expected?

Images and 3D models make up most of the size. The KML text itself compresses well.

Do I lose anything when I unzip a KMZ?

The KML document stays the same. If it refers to images in the archive, keep them next to it in the same folders, or the icons and pictures will be missing.