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
| Data | KML | KMZ |
|---|---|---|
| Recorded tracks | Yes | Yes |
| More than one track | Yes | Yes |
| Track segments | YesAs a MultiGeometry | YesAs a MultiGeometry |
| Planned routes | YesWritten as lines, read back as tracks | YesWritten as lines, read back as tracks |
| Waypoints | YesAs Point placemarks | YesAs Point placemarks |
| File name and title | Yes | Yes |
| Description | Yes | Yes |
| Author | No | No |
| Creation time | No | No |
| Links | No | No |
| Track names | Yes | Yes |
| Activity type | No | No |
| Elevation | Yes | Yes |
| Timestamps | YesOnly in gx:Track | YesOnly in gx:Track |
| Heart rate | With an extensionExtendedData in gx:Track | With an extensionExtendedData in gx:Track |
| Cadence | With an extensionExtendedData in gx:Track | With an extensionExtendedData in gx:Track |
| Power | With an extensionExtendedData in gx:Track | With an extensionExtendedData in gx:Track |
| Temperature | With an extensionExtendedData in gx:Track | With an extensionExtendedData in gx:Track |
| Speed | With an extensionExtendedData in gx:Track | With 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
- Make a copy of the KMZ file.
- Change the extension of the copy to
.zip. - Unpack it. The KML document is the
.kmlfile at the top level, usuallydoc.kml.
How to turn a KML into a KMZ
- Put the KML file, named
doc.kml, in a folder with any images it uses. - Select the contents of the folder and compress them into a ZIP archive.
- Rename the archive from
.zipto.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.