KMZ file format
A KMZ file is a KML file packed in a ZIP archive, usually together with the icons and images the map uses. It holds the same data as KML in a smaller file.
- Extension
- .kmz
- Type
- ZIP archive
- Main file
- doc.kml, by default
- Also holds
- Icons, images and 3D models
Open a KMZ file in the KMZ viewer. It runs in your browser, and the file never leaves your device.
What a KMZ file can store
| Data | KMZ |
|---|---|
| Recorded tracks | Yes |
| More than one track | Yes |
| Track segments | YesAs a MultiGeometry |
| Planned routes | YesWritten as lines, read back as tracks |
| Waypoints | YesAs Point placemarks |
| File name and title | Yes |
| Description | Yes |
| Author | No |
| Creation time | No |
| Links | No |
| Track names | Yes |
| Activity type | No |
| Elevation | Yes |
| Timestamps | YesOnly in gx:Track |
| Heart rate | With an extensionExtendedData in gx:Track |
| Cadence | With an extensionExtendedData in gx:Track |
| Power | With an extensionExtendedData in gx:Track |
| Temperature | With an extensionExtendedData in gx:Track |
| Speed | 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 is inside a KMZ file
Google’s KML documentation describes the layout. The main KML file sits at the top level of the archive and is named doc.kml by default. Images, icons and 3D models go in subfolders, and the KML refers to them by relative paths such as files/start.png. The archive should hold a single KML file at the top level, because Google Earth reads the first one it finds there and ignores the others.
A KMZ for a hike with an icon and a photo could hold:
trail.kmz
doc.kml
files/start.png
files/summit.jpg
Compression makes the file smaller. Google’s documentation gives about 10 to 1 as a typical ratio and recommends KMZ once the KML is larger than 10 KB.
How to see inside a KMZ file
- Make a copy of the file.
- Change the extension of the copy from
.kmzto.zip. - Open it with any archive tool, such as the one built into Windows or macOS.
To build a KMZ, select the contents of the folder that holds doc.kml, compress them into a ZIP archive, and rename the archive to .kmz. Select the contents of the folder, because zipping the folder itself puts doc.kml one level too deep.
How TrackLoupe reads a KMZ file
The KMZ viewer unpacks the archive in your browser and opens the first KML document at the top level, or the first one in any folder when there is none at the top. Images and other files are not read. A note says how many other KML documents were left out.
To protect the memory of your device, a KMZ whose KML would take more than 300 MB once unpacked is refused.
How to open a KMZ file
- In your browser: the KMZ viewer shows the tracks and points with an elevation profile, and the file stays on your device.
- In Google Earth: Google Earth on the web imports KMZ files.
- In Google My Maps: My Maps imports KMZ files when the unpacked content is up to 5 MB.
Questions
What is the difference between KMZ and KML?
The data is the same. A KMZ is a compressed KML that can carry its images inside. The KML vs KMZ page explains when to use each.
Is a KMZ file the same as a ZIP file?
It is a ZIP archive with a .kmz extension and a KML document inside. Any archive tool opens it once the extension is changed to .zip.
Why does my KMZ file open only part of its content?
The archive may hold several KML documents. Viewers usually read only the first one at the top level, as Google Earth does.
Can I convert a KMZ file to GPX here?
Not yet. A KML/KMZ to GPX converter is listed under “Coming next” on the tools page.