KMZ — Zipped KML with Resources: What It Is, How to Create and Unpack

2026-04-269 min read
KMZKMLGoogle EarthZIPnavigation

KMZ is a ZIP archive with one mandatory file doc.kml inside and an optional set of resources: icons, photos, 3D models, textures. Essentially it's a packaging box for KML solving two practical problems. First, size: a text KML with one Berlin district map weighs 8–15 MB, while after ZIP compression — 1–2 MB. That's a 3-10× size reduction critical for email attachments and mobile transfer. Second, single-file: instead of a folder with dozens of PNG icons and one XML — one .kmz that the user downloads, opens in Google Earth, and the whole map with POI photos and 3D building models appears in one motion.

Map generation of Ekaterinburg city center
Prague Castle, KMZ from osm2cdr.ru, opened in Google Earth Pro. The archive contains `doc.kml`, an `images/` folder with POI icons, and compact building styles.

History: KML standardized, KMZ is just ZIP

KML (Keyhole Markup Language) was born in 2001 at Keyhole, Inc., which created a popular 3D Earth viewer. In 2004 Google acquired Keyhole and renamed the product Google Earth — KML became the native data exchange format. The specification was open but controlled by Google until 2008, when the format was adopted by the Open Geospatial Consortium as standard OGC 07-147r2 (KML 2.2). From that moment KML became an open international standard.

KMZ appeared practically simultaneously with KML, in the first Google Earth versions. The idea is simple: KML is an XML document, sometimes huge, often referencing external files — like custom PNG icons for different POI types or textures for 3D building models. Passing a folder with scattered files is awkward, plus XML compresses well with ZIP. Obvious solution: pack the KML and its resources into one ZIP, rename the extension to .kmz.

OGC's KMZ spec is not separate — it's part of the KML 2.2 document (section KMZ Files). Technically KMZ is just a ZIP archive (using the same deflate algorithm as .zip), with one mandatory rule: the main KML file must be named doc.kml and live in the archive root. Everything else is optional and goes in subfolders.

Google as steward still maintains the spec via developers.google.com/kml and periodically publishes clarifications around extended data, network links, and 3D models. No fundamental changes since the 2008 standardization.

Anatomy of the ZIP container

Open any .kmz in WinRAR, 7-Zip, or just rename to .zip and extract with Windows Explorer. Inside typically:

my-map.kmz (after renaming to .zip):
├── doc.kml              # mandatory main file
├── images/              # optional images
│   ├── poi-cafe.png
│   ├── poi-museum.png
│   └── photo-eiffel.jpg
├── models/              # optional 3D models
│   ├── tower.dae        # Collada DAE
│   └── building.kmz     # nested KMZ for NetworkLink
└── icons/               # alternative icons folder
    └── custom-marker.png

In doc.kml, resource links are relative paths from the archive root:

<Style id="cafe">
  <IconStyle>
    <Icon>
      <href>images/poi-cafe.png</href>
    </Icon>
  </IconStyle>
</Style>

The reader (Google Earth, QGIS, mobile app) unpacks the archive into a temp folder on load and resolves all href references relative to it. No outbound HTTP requests — all resources are embedded.

Compression comes from ZIP-deflating XML text and any inherently-uncompressed images. PNG is already compressed, so ZIP shrinks it by only a few percent. But XML with thousands of polygons compresses 8–12× — that's the main size win.

Who needs KMZ

Tourist and traveler. The most common scenario — send a route by email or messenger. A large KML with attraction photos weighs 5 MB; the same info in KMZ — 800 KB. The recipient opens in Google Earth or Maps.me, sees your POIs with photos, reads descriptions. No extra setup.

Real estate and tourism marketer. A country development presentation with 3D house models and lot photos is a KMZ file the client opens on their phone. Each object is clickable, with a description and contact. Far more alive than a PDF catalog.

Geography teacher. Educational map with custom icons for nature object categories: volcanoes, rivers, tropical forests, mountain ranges. Icons drawn by the teacher, embedded in KMZ — students download one file and see a thematic atlas.

Open data publisher. Government agencies publish datasets in KMZ — Russian protected areas with boundaries and emblem icons, municipalities with zoning. One file, one download link.

KMZ-reading software

Google Earth Pro. Free (formerly paid), Windows, macOS, Linux. Desktop version with full 3D visualization. Native format — KMZ saves by default via File → Save As. google.com/earth/versions

Google Earth Web. Free, works in Chrome and Edge. Import KMZ via Projects → New Project → Import KML file. Handles large files (>30 MB) worse than desktop.

Google My Maps. Free, web app for creating your own maps. Imports KMZ up to 5 MB via Import → File. Good for embedding on a site via iframe.

QGIS. Free, via GDAL/OGR driver. Layer → Add Vector Layer → pick .kmz. Unpacks and loads doc.kml automatically. Styles partially lost.

ArcGIS Pro. Paid. Opens KMZ via Add Data → KML/KMZ. Styles convert to ArcGIS symbology.

Maps.me / Organic Maps. Free mobile apps for offline navigation. Import KMZ via Open With intent — great for offline travel.

OsmAnd. Free/paid mobile navigator. Import KMZ via Plus → Plugin → KML/KMZ. Fits hiking and biking routes with attached POIs.

Marble (KDE). Free, cross-platform 3D globe from KDE. Opens KMZ as native format.

Pros and cons

Pros. Compactness: 3–10× compression vs plain KML through ZIP. Single-file: one .kmz instead of an XML folder with resources. Embedded resources: photos, icons, 3D models ship alongside the map. Open OGC standard. Universality: desktop (Google Earth, QGIS, ArcGIS), mobile (Maps.me, OsmAnd, Google Maps), web (Google My Maps). Easy debug: rename to .zip, unpack, read XML.

Cons. No direct edit: to modify a KMZ — unpack, edit doc.kml or resources, repack. Size limited by recipient's practical caps: Google My Maps — 5 MB, mobile apps — usually comfortably up to 50 MB. Compression works well for XML, poorly for already-compressed PNG/JPG — adding 10 photos of 500 KB each barely shrinks. Styles get lost on import to QGIS/ArcGIS (KML/KMZ styles model differently from QML or Esri symbology).

KMZ vs KML

Parameter KMZ KML
Type ZIP archive XML document
Size Compressed (10–30% of KML) Full XML
Resources Embedded External links only
Editing Unpack → edit → repack In any text editor
Email-attachment size Fits 1–5 MB nicely Often too large
Unpacking WinRAR/7-Zip/standard zip Not needed

KMZ — when you need custom icons, embedded photos, 3D models, or just email compactness. KML — when you need to hand off "human-readable" XML opening in a text editor, or embed on a site via <embed>.

How to make KMZ from OpenStreetMap

Step 1. On osm2cdr.ru pick KMZ from the format dropdown. GIS / Navigation category.

Step 2. Draw the area. For tourism — 2–10 km. For a city route — narrow strip along the track. For a district atlas — 5×5 km square.

Step 3. Pick a style. standard keeps classic OSM colors familiar to Google Earth. contrast for Google Earth print with bright borders. Styles inside KMZ convert to KML <Style> elements.

Step 4. Layers. For a tourism KMZ usually include POI, roads, green, water. Buildings — optional, inflate size.

Step 5. Click Export. Within 30–90 seconds get a .kmz file. Double-click to open — the OS auto-launches Google Earth Pro (if installed).

Get a KMZ Map of Prague Castle in 60 Seconds

Pitfalls

Max size. For Google My Maps — 5 MB. For Google Earth Pro — theoretically unlimited, but >100 MB becomes slow. For Maps.me and OsmAnd — comfortably up to 50 MB. If the file is larger — simplify geometry or split into multiple KMZs.

Icons and PNG compression. If your KMZ has many 64×64 PNG icons — those are already compressed, ZIP barely shrinks them. To reduce KMZ size — optimize PNGs via PNGCrush or TinyPNG before packaging.

Relative vs absolute paths. All hrefs in doc.kml must be relative (images/cafe.png, not /var/www/images/cafe.png). Absolute paths break on other machines.

Doc.kml vs other names. The main KML file must be exactly doc.kml. Renamed to main.kml — Google Earth won't find the entry point. This rule is 20 years old and immovable.

Network Links and nested KMZ. KML supports <NetworkLink> — a reference to another KML/KMZ loaded on the fly. In KMZ, nested KMZ works but adds complexity and unpredictability. Aim for one level.

FAQ

How is KMZ different from KML? KMZ is a ZIP archive with doc.kml inside and optional resources (icons, photos, 3D models). KML is a plain XML document. KMZ is more compact and convenient for distribution, KML — for editing.

How do I open KMZ on a smartphone? Google Earth (iOS/Android), Maps.me, Organic Maps, OsmAnd — all accept KMZ via Open With intent. Got the file in Telegram or WhatsApp — tap and pick a program.

Can I unpack KMZ as ZIP? Yes. Rename .kmz to .zip, open in WinRAR/7-Zip/standard explorer. You'll see doc.kml and optional resource folders.

What's the max size for Google Maps? Google My Maps — 5 MB. Google Earth Pro — practical limit 100 MB, theoretical higher. For guaranteed mobile compatibility — up to 10 MB.

Does KMZ support 3D models? Yes, via Collada DAE files embedded in the archive. Works in Google Earth Pro, partially in QGIS via plugin. Mobile apps usually ignore 3D or show as points.

Sources

← All articles