How to use the KML and KMZ viewer
- Open the map file. Either format works: drop a .kml or a zipped .kmz on the box above, or browse to it.
- Explore the map. Points, lines and polygons from the file are drawn on it, and you can pan and zoom.
- Click a name in the placemark list to zoom to that feature, or press “Export GeoJSON” to save the data in another format.
Your file is read by JavaScript in the browser. The background map is fetched from a map provider, but the file’s contents are not sent anywhere.
What is a KML file?
A KML file describes places on the Earth: single points, paths and outlined areas, each with a name and often a description. KML stands for Keyhole Markup Language. It was created for the program that became Google Earth and is now an open standard maintained by the Open Geospatial Consortium.
Underneath, it is XML, a text format. Open one in a text editor and you can read the placemark names and the coordinates, written as longitude, latitude and an optional altitude.
People usually get one as an export from Google Earth or Google My Maps, from GIS and survey software, or from a website that publishes boundaries or routes.
What is the difference between KML and KMZ?
A KMZ file is a KML file compressed into a zip archive, sometimes with the images and icons it uses packed alongside it.
| Compared | KML | KMZ |
|---|---|---|
| What it is | XML text | Zip archive holding a KML file, usually named doc.kml |
| File size | Larger | Smaller |
| Images and icons | Can only link to them | Can carry them inside the archive |
| Readable in a text editor | Yes | Only after unzipping |
The geographic data is the same in both. If you ever need the KML out of a KMZ, change the extension to .zip and unzip it. To view a KMZ online you do not have to do that: the viewer unpacks it for you.
How do I open a KML file without Google Earth?
Open it in any tool that reads the format; the viewer on this page is one and needs no install or account.
It suits the common case of checking what a file contains and where it is. You see every point, line and polygon in the right place and can jump between them from the list. It does not reproduce the look defined in the file: styling, custom icons and image overlays are left out.
Other routes, depending on what you need:
- Google My Maps can import a KML or KMZ file into a map layer. It needs a Google account and stores the data in it.
- Desktop GIS software such as QGIS opens KML as a layer for analysis and editing.
- A text editor shows the raw names and coordinates, which is enough to copy one location.
To put the data onto a handheld GPS or into a sports app, convert it with the KML to GPX converter. If your file is a recorded track ending in .gpx, the GPX viewer adds distance and elevation figures.