What Is a KML File?

How to Open, Edit, and Convert KML Files

KML Files
KML Files.

A file with the .KML file extension is a Keyhole Markup Language file. KML files use XML to express geographic annotation and visualization by storing locations, image overlays, video links and modeling information like lines, shapes, 3D images and points.

Various geospatial software programs use KML files since the purpose is to put the data into a format that other programs and web services can easily use.

This included Keyhole Earth Viewer from Keyhole, Inc. before Google acquired the company in 2004 and started using the format with Google Earth.

How to Open KML Files

Google Earth was the first program to be able to view and edit KML files, and it's still one of the most popular ways to open KML files online. With the web page open, use the My Places menu item (the bookmark icon) to load a KML file from your computer or Google Drive account.

Note: Google Earth runs in the Chrome web browser only. If you want to use Google Earth without using Google Chrome, you can download Earth Pro for Windows, Mac or Linux (use the File > Open... menu to open a KML file in the desktop version).

ArcGIS, Merkaartor, Blender (with the Google Earth Importer plug-in), Global Mapper and Marble can open KML files as well.

You can open KML files with any text editor too (like Notepad++) since they're really just plain text XML files.

However, doing this will just let you see the text version, which includes coordinates and possibly image references, camera tilt angles, timestamps, etc.

How to Convert a KML File

The online version of Google Earth is one easy way to convert KML files to KMZ or vice versa. With the file open in My Places, use the menu button to save the file to your computer as KMZ, or use the other menu (the three vertically stacked dots) to export KMZ to KML.

To save a KML file to an ESRI Shapefile (.SHP), GeoJSON, CSV or GPX file, you can use the MyGeodata Converter website. Another KML to CSV converter can be had at ConvertCSV.com.

Note: MyGeodata Converter is only free for the first three conversions. You can get three free ones each month.

If you want to convert a KML file to an ArcGIS layer, follow that link for more information.

If you want to convert your KML file to XML, you don't actually have to do a conversion. Since the format is actually XML (the file is just using the .KML file extension), you can rename .KML to .XML to have it open in your XML viewer.

You can import a KML file directly into Google Maps too. This is done through your Google My Maps page when adding content to a new map layer. With the map open, choose Import within any layer to load a KML file from your computer or Google Drive. You can make a new layer with the Add layer button.

More Information on the KML Format

KMZ and ETA files are both Google Earth Placemark files. However, KMZ files are just ZIP files that contain a KML file and any other resources, like images, icons, models, overlays, etc. ETA files were used by Earth Viewer and early versions of Google Earth.

As of 2008, KML has been part of an international standard of the Open Geospatial Consortium, Inc. The full KML specification can be seen on Google's KML Reference page.

Still Can't Open Your File?

If you still can't get your file to open or convert with the programs mentioned above, you might be misreading the file extension. It's possible that you're dealing with a file that really has nothing to do with the KML format.

Another interchangeable geography data format is Geography Markup Language but they use the similarly spelled .GML file extension.

KMR files are not related at all and are instead KnowledgeMill Link files used by the Microsoft Outlook KnowledgeMill Filer plug-in.

Another file format you might be confusing with KML is Korg Trinity/Triton Keymap or Mario Kart Wii Course Description, both of which use the .KMP file extension and open with FMJ-Software's Awave Studio and KMP Modifier, respectively.

LMK files are easy to confuse with KML files too, but they are Sothink Logo Maker Image files that you can open with Logo Maker from Sothink.