KML vs KMZ: Understanding Google Earth Formats
What is the difference between KML and KMZ? Learn about Google Earth file formats, compression, and which one you should use for your maps.
What is the difference between KML and KMZ? KML is the standard XML file format for Google Earth data. KMZ is simply a zipped (compressed) KML file. Think of KMZ as a container that holds the KML file plus any images or icons used in the map.
Quick Comparison
| Feature | KML (Keyhole Markup Language) | KMZ (Keyhole Markup Zipped) |
|---|---|---|
| Format | XML Text (Human readable) | ZIP Archive (Binary) |
| File Size | Larger | Smaller (Compression ~10:1) |
| Contents | Only map data | Map data + Images + Icons |
| Editing | Edit in Notepad/Text Editor | Must unzip first |
| Sharing | Best for simple data | Best for maps with images |
What is KML?
KML is a text-based format. You can right-click a KML file, choose "Open with Notepad", and read the code.
Pros:
- Human readable and editable
- Easy to parse with scripts
- Works with all converters
Cons:
- File size can get large
- External images/icons will break if sent to others (broken links)
What is KMZ?
KMZ is a ZIP archive. If you change the file extension from .kmz to .zip, you can open it like any other zip folder. Inside, you'll find a doc.kml file and usually a files/ folder containing images.
Pros:
- Much smaller file size
- Bundles images and icons (self-contained)
- Faster to download/email
Cons:
- Must be unzipped to edit the code
- Some older GPS software might not read it
When to Use Which?
Use KML When:
- You need to convert the file to GPX (converters prefer KML)
- You want to edit the coordinates manually in a text editor
- You are developing a script to generate map data
- The file contains only simple points or paths
Use KMZ When:
- You are sharing a file via email (smaller size)
- Your map includes custom icons or photo overlays
- You have a large dataset (compression helps significantly)
- You want a single file that "just works" for the recipient
Converting KMZ to KML
Since KMZ is just a zip file, you don't need special software:
- Rename
myfile.kmztomyfile.zip - Double-click to open/extract the zip
- Inside, find
doc.kml - That's your KML file!
Converting for GPS
If you need to put a Google Earth file on a GPS device, you need GPX format.
- If you have a KMZ, extract the KML first (as above)
- Use our KML to GPX Converter
- Download the GPX file for your device