What Is a .KML File?

A .kml file is a map data file in Keyhole Markup Language, an XML format for placemarks, paths, polygons and overlays on Google Earth and other map apps. It stores coordinates with names, descriptions and styles as plain text. Google Earth, Google My Maps and most GIS programs open KML files.

Extension
.kml
Full name
Keyhole Markup Language
Type
Map and GPS file
MIME type
application/vnd.google-earth.kml+xml
Developed by
Keyhole (now Google); an OGC standard

About KML files

KML was created by Keyhole, the company whose software became Google Earth after Google acquired it in 2004. It became an Open Geospatial Consortium standard in 2008. A KML file is readable XML: a Placemark element with a name and a Point, LineString or Polygon holding longitude, latitude and optional altitude values.

KML can also describe styles (pin icons, line colors), folders, time-based animations, ground overlays that drape images onto the map, and network links that load live data from a URL. Because images and icons are referenced rather than included, a KML that uses custom icons is often shipped as a KMZ instead.

Not every app supports every feature. Google My Maps, for example, imports placemarks, lines and shapes but drops tours, time animations and some HTML in descriptions, and limits KML and KMZ imports to 5 MB. Large GIS datasets usually travel as shapefiles or GeoJSON instead.

What KML files are used for

  • Sharing a set of pins, routes or areas on Google Earth
  • Importing places into Google My Maps
  • Exporting boundaries and survey points from GIS software
  • Planning drone flights, hikes and property boundaries

How to open a .kml file

Online / any browser

In Google Earth on the web, open Projects, choose New project > Import KML file from computer. In Google My Maps, create a map and click Import under a layer.

Windows

Google Earth Pro (free desktop app) opens KML with File > Open. QGIS also reads it, and any text editor shows the raw XML.

Mac

Install Google Earth Pro or QGIS, or view the XML in TextEdit.

iPhone and Android

The Google Earth app can open KML files from your device or Google Drive.

How to convert a .kml file

To make a KMZ, save the KML from Google Earth Pro as KMZ, or ZIP the KML (renamed doc.kml) with its icons and change the archive extension to .kmz.

To convert KML to GPX for a GPS device or fitness app, use GPSBabel or open it in QGIS and export the layer as GPX.

For a spreadsheet of coordinates, export the layer from QGIS as CSV, or import the KML into My Maps and export the data.

Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.

Naming and renaming KML files

  • Name the file after the place and purpose (yosemite-campsites-2025.kml) because many apps show the file name as the layer title.
  • Set a meaningful Document name inside the KML too; Google Earth shows that in the Places panel instead of the file name.
  • Avoid spaces and special characters if the KML will be served from a web server as a network link.

Renaming lots of .kml files? Use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.

Related file types

Frequently Asked Questions

How do I open a KML file in Google Maps?

Google Maps itself cannot import files. Use Google My Maps (create a map, then Import), and the map can then be viewed in Google Maps.

What is the difference between KML and KMZ?

KMZ is a zipped KML that can also bundle icons and images, so it is smaller and self-contained.

Can I edit a KML file?

Yes. It is plain XML, so any text editor works, or edit the places visually in Google Earth Pro and save again.

More map and gps file extensions · all file extensions