KML is an open XML format for geographic data, KMZ is its compressed variant (ZIP archive). They're essentially the same format with different properties.
| Criteria | KML | KMZ |
|---|---|---|
| File size | Large | Compact (ZIP) |
| Human-readable | ✓ | ✗ |
| Embedded resources | ✗ | ✓ |
| Google Earth | ✓ | ✓ |
| Easy sharing | ✗ | ✓ |
When you need to edit XML manually, debug geocoding, or integrate into code.
For email sharing, Google Earth publishing, compact storage.

KML (Keyhole Markup Language) was developed by Keyhole, the company behind Google Earth, which Google acquired in 2004. Google later handed it to the Open Geospatial Consortium, and KML 2.2 became an OGC standard in 2008.
A KML document is XML: placemarks with points, lines and polygons are organised in folders, each with a name, a description and optional ExtendedData attributes. Styles define icons, line widths and fill colours; altitude modes and extrusion let features rise above the ground; network links and ground overlays pull in external content.
Google Earth Pro and Google Earth on the web open KML with a double click or a drag; Google My Maps, QGIS, ArcGIS, Global Mapper, Marble and many mobile apps import it.
KML is built for presentation: a client can explore the data on a globe without GIS skills, click a feature to see its attributes and switch folders on and off. As text it is easy to generate, inspect and edit.
It supports only WGS 84, files grow quickly because XML is verbose, and styling is limited to what Google Earth understands. It is a poor fit for analysis: attribute schemas are loose, and large datasets slow the viewer down.
osm2cdr places each layer in its own folder, keeps the OSM tags of every feature in ExtendedData and gives lines and fills a colour and width. Roads, water and greenery lie on the ground, while buildings are extruded to the height from their tags, so Google Earth shows a three-dimensional city straight away.

KMZ is the zipped form of KML, defined in the same OGC KML specification and handled natively by Google Earth. It exists for a practical reason: XML compresses very well, and one archive can carry the document together with the icons and images it refers to.
Open a KMZ with any archive tool and you will find doc.kml at the root plus optional folders with images, icons or 3D models referenced by relative paths. Everything KML can describe — placemarks, folders, styles, extruded buildings — works exactly the same inside the archive.
Google Earth Pro, Google Earth on the web, Google My Maps, QGIS, ArcGIS and Global Mapper read KMZ without unpacking it; Garmin devices accept KMZ files as custom maps when they contain image overlays.
Files are usually several times smaller than the same KML, they travel safely by email or messenger as a single attachment, and embedded resources cannot get separated from the document.
The content cannot be read or edited in a text editor without unzipping it first, and some web tools and older converters accept only plain KML. Compression does not make a large dataset any faster to display.
osm2cdr builds the same document as its KML export — layers in folders, OSM tags in ExtendedData, WGS 84 coordinates, buildings extruded by their tagged heights and the other layers lying on the ground — and packs it into one compact KMZ.
At the most basic level, KML is an XML format for showing geographic data on a virtual globe, while KMZ is a ZIP-compressed KML package. On disk, KML is plain XML text; KMZ is a ZIP archive with doc.kml and optional images.
Here is what the comparison table above means in practice, point by point:

In short: choose KML when the result is shown on a globe to a client, colleagues or students. Choose KMZ when the globe view has to travel by email or messenger as one small attachment.
You are emailing a client a proposed delivery zone with the surrounding buildings to explore in Google Earth. KMZ is the better attachment: it is much smaller, arrives as one file and opens with a double click.
You generate placemarks with a script and want to check what is inside or adjust a style by hand. KML is plain XML, so you can open it in any text editor, compare two versions and fix a colour without extra tools.
You are uploading the data to a web tool or an older converter. Some of them accept only plain KML, so having the uncompressed version saves you a failed import and a confusing error message.
Renaming a .kmz to .kml does not work — the archive has to be unzipped, and the document inside is called doc.kml. When you repack a KML into KMZ yourself, icons referenced by absolute paths on your computer are not included, so the recipient sees missing images. The good news is that osm2cdr's two exports carry identical content, so switching between them never loses OSM tags, folders or building heights.
If a mail server blocks the attachment, a KMZ inside a cloud link is the most reliable way to share the globe view.
On osm2cdr, pick KMZ when the file travels — by email, messenger or cloud link. Pick KML when you plan to edit, inspect or post-process the document, or when the receiving tool insists on uncompressed KML. Both open in Google Earth with the same three-dimensional city.
osm2cdr builds KML and KMZ directly from OpenStreetMap data — there is no need to download raw OSM extracts or install conversion tools. The steps:
Converter pages related to KML and KMZ explain each route in more detail:
KML is an XML format for showing geographic data on a virtual globe, whereas KMZ is a ZIP-compressed KML package. In the comparison table, KML is ahead on human-readable; KMZ is ahead on embedded resources and easy sharing.
KML. KML is built for presentation: a client can explore the data on a globe without GIS skills, click a feature to see its attributes and switch folders on and off.
When embedded resources and easy sharing matter most. Files are usually several times smaller than the same KML, they travel safely by email or messenger as a single attachment, and embedded resources cannot get separated from the document.
There is no dedicated KML-to-KMZ converter page on osm2cdr. Both formats are exported directly from OpenStreetMap data: select an area once and run the export for each format you need.
KML files open in Google Earth, Google My Maps, QGIS, ArcGIS and Global Mapper. KMZ files open in Google Earth, Google My Maps, QGIS, ArcGIS and Global Mapper.
KML always uses WGS 84 longitude, latitude and optional altitude, so features land in the right place in Google Earth without any setup. KMZ holds an ordinary KML document, so its coordinates are WGS 84 longitude, latitude and altitude as well.