.KML file extension
To open .KML files on Windows, install and open Google Earth.
To open a .kml file, use Google Earth and import the file into a project (or open it as a local KML file). Many GIS applications that support the OGC KML standard can also read .kml files.
Last updated: June 12, 2026
Open on your device
Choose your operating system for a dedicated step-by-step opening guide.
How to open .KML files
Use these platform-specific instructions to open .KML files safely.
Windows
- Install and open Google Earth.
- Use the Google Earth import option to import the .kml file into an Earth project (or open it as a local KML file).
Mac
- Install and open Google Earth.
- Import the .kml file into an Earth project (or open it as a local KML file) using Google Earth’s import workflow.
Linux
- If you have a KML-capable GIS application installed (for example, a desktop GIS that supports OGC KML), open the .kml file from that app’s Open/Import function.
- If you don’t have a compatible GIS viewer on Linux, transfer the file to a system with Google Earth and import it there.
iOS
- If you need guaranteed compatibility, transfer the .kml file to a desktop and open/import it with Google Earth as described in Google’s documentation.
Android
- If you need guaranteed compatibility, transfer the .kml file to a desktop and open/import it with Google Earth as described in Google’s documentation.
Security notes
- KML is XML; opening untrusted KML can still be risky if a viewer has XML parsing vulnerabilities. Prefer opening files from trusted sources and keep your GIS/viewer software up to date.
- KML can reference external resources (for example, network-linked content or remote overlays). When importing untrusted KML, be cautious about allowing it to load remote content that could reveal IP/location metadata or download unexpected assets.
- KMZ is a packaged form of KML; treat KMZ from unknown sources with the same caution as other downloaded containers, because it may bundle additional resources alongside the KML.
If you did not expect this file
This extension is usually plain data, text, or structured content—not a program by itself. The practical risk is social engineering (a scam attachment or misleading filename). For trusted senders you rarely need heavy-handed antivirus wording; use these tools when you want an extra check on unexpected downloads.
Avast offers free and premium antivirus software that protects against viruses, malware, ransomware, and phishing. Scan files before opening them to ensure safety.
NortonNorton 360 delivers comprehensive antivirus protection, VPN, and identity theft monitoring. Scan files for threats before opening to keep your device secure.
We may earn a commission when you use affiliate links. This supports our free file extension guides.
Can't open this file?
These are the most common causes and fixes when .KML files fail to open.
Common reasons
- The KML file opens as plain text or looks like code
- Import fails or features don’t show up
- You received a .kmz instead of .kml (or vice versa)
Fix steps
- Open the file from a map/globe viewer such as Google Earth and use its import/open workflow for local KML files.
- If you must edit it, make changes in a text editor and then re-open it in Google Earth (or a GIS app) to verify it renders correctly.
OS-specific troubleshooting
What is a .KML file?
KML (Keyhole Markup Language) is an OGC standard that encodes geographic annotations and visualization features using XML. Files typically contain coordinates and feature definitions (for example, points, lines, polygons, and styles), and are identified by the KML XML namespace (http://www.opengis.net/kml/2.2). KML data can also be packaged as a compressed KMZ container.
Background
KML is widely used to exchange and visualize geographic data—such as points of interest, routes, boundaries, and overlays—on compatible mapping and globe applications. Because it’s XML, KML can be viewed and edited with a text editor, but it’s usually consumed through a map/globe viewer or GIS software that renders the geometry and styling.
KML is published as an Open Geospatial Consortium (OGC) standard, and the OGC provides the KML 2.3 implementation standard and related schemas. This standardization makes KML a practical interchange format between different mapping and GIS workflows.
In practice, users often encounter KML when sharing “pins” and routes, publishing simple geographic overlays, or moving visualization data between tools. Google Earth documentation specifically describes importing KML/KMZ into an Earth project or opening local KML files, and Esri’s ArcMap documentation describes KML as an XML-based, OGC-standard format used for geographic data and visualization.
Common MIME types: application/vnd.google-earth.kml+xml
Known aliases: .kmz
Further reading
Authoritative resources for more details on the .KML format.
- Media Types - IANA (KML MIME type registration)
- KML - Open Geospatial Consortium (OGC standard page)
- OGC 12-007r2: OGC KML 2.3 Implementation Standard (PDF)
- Import KML into an Earth project or a local KML file (Google Earth documentation)
- What is KML?—ArcMap (Esri documentation)
- Keyhole Markup Language (Wikipedia overview)
Common .KML issues
The KML file opens as plain text or looks like code
KML is XML, so if it’s opened in a text editor it will appear as tags and coordinates rather than a map view.
- Open the file from a map/globe viewer such as Google Earth and use its import/open workflow for local KML files.
- If you must edit it, make changes in a text editor and then re-open it in Google Earth (or a GIS app) to verify it renders correctly.
Import fails or features don’t show up
The file may not be valid KML, may not match expected namespaces, or may contain content that a particular viewer doesn’t support.
- Confirm the file is actually KML (it should be XML and typically reference the KML namespace like http://www.opengis.net/kml/2.2).
- Try importing the same file into another KML-capable application (for example, Google Earth versus a GIS tool such as ArcGIS) to rule out app-specific limitations.
- If the file was produced by an exporter, re-export using an OGC KML 2.x-compatible setting (KML 2.3 is the current OGC implementation standard).
You received a .kmz instead of .kml (or vice versa)
KMZ is a packaged (compressed) form of KML; some sharing workflows send KMZ because it can bundle related resources with the KML.
- Try opening/importing the file directly in Google Earth; Google Earth supports both KML and KMZ import.
- If you specifically need raw KML, obtain/export the uncompressed .kml from the source tool (or open the KMZ in a tool that can extract the contained KML).
FAQ
What does a .kml file contain?
Geographic features and visualization instructions encoded as XML—such as placemarks, lines/routes, polygons/areas, and overlays—intended to be rendered on a map or virtual globe.
Is KML a standard format?
Yes. KML is an Open Geospatial Consortium (OGC) standard; OGC publishes the KML 2.3 implementation standard and related schemas.
What’s the difference between KML and KMZ?
KML is the XML text format; KMZ is a packaged (compressed) form that can bundle KML together with related resources.
What is the official MIME type for .kml?
The registered media type is application/vnd.google-earth.kml+xml (IANA Media Types registry).
Similar file extensions
Compare related formats in the same category to find the right tool faster.
- .geojson - GeoJSON (RFC 7946) geospatial data
- .shp - Esri Shapefile (geometry file)
- .gpkg - OGC GeoPackage (SQLite) geospatial database
- .osm - OpenStreetMap OSM XML (map data)
- .prj - ESRI/Shapefile Projection (WKT CRS) File
- .shx - Esri Shapefile Index (SHX)
- .kmz - KMZ (Zipped KML) geospatial archive
- .mbtiles - MBTiles (SQLite tile set)