What a KML file is and why you might have one

A KML file is a text document that stores map data — locations, routes, shapes drawn on a map, and labels. KML stands for Keyhole Markup Language. You'll encounter KML files when someone shares map information with you: a hiking trail route, property boundaries, store locations across a city, or directions saved from Google Maps.

KML files look like regular files on your computer with a .kml extension at the end of the filename. They're plain text underneath, but you don't open them in Notepad — you open them in mapping software that knows how to read the location data and display it visually on a map.

The most common reason you have a KML file is that you downloaded it from Google Maps, received it from a colleague or friend, or exported it from mapping software you were using. Unlike image files or documents, KML files are designed specifically to work with map applications.

Key Takeaways

  • Google Maps is the simplest way to open a KML file on any computer — you upload it directly into Google Maps and it displays on your screen.
  • You can also open KML files with free desktop software like Google Earth, QGIS, or ArcGIS Explorer, depending on what you want to do with the map data.
  • On a Mac, you can double-click a KML file and it will usually open in Google Earth automatically if that software is installed.
  • On Windows, right-click the KML file and choose "Open with" to select which mapping program you want to use.
  • If no mapping software is installed on your computer, Google Maps online is always available and requires no installation.

Opening a KML file with Google Maps (no software needed)

The fastest way to view a KML file is through Google Maps in your web browser. This method works on any computer — Windows, Mac, or Linux — and requires no software installation. Go to maps.google.com and sign in with your Google account (create one free if you don't have one).

Click the menu icon (three horizontal lines) in the top left corner of the map. Select "Your places" and then click the "Maps" tab. Look for a button labeled "Create Map" or a plus icon. Click it, then select "Import" from the dropdown menu. A dialog box opens asking you to upload a file. Click "Select a file from your computer" and navigate to your KML file. Select it and click "Open."

Google Maps will read the file and display all the locations, routes, and shapes on the map. You can zoom in and out, click on individual points to see labels, and share the map with others by clicking the "Share" button. This method works for most KML files and is the best choice if you just want to view the map data without editing it.

Opening a KML file with Google Earth (desktop software)

Google Earth is free software that specializes in displaying map data and satellite imagery. If you already have Google Earth installed on your computer, opening a KML file is simple: double-click the KML file and it will open directly in Google Earth. If it doesn't, right-click the file, select "Open with," and choose Google Earth from the list.

If you don't have Google Earth installed, download it free from earth.google.com. The download takes a few minutes. Once installed, double-clicking any KML file will launch Google Earth and display the map data. Google Earth shows satellite imagery and 3D terrain, which can be useful if you're looking at property lines or geographic features and want to see what the area actually looks like from above.

Google Earth also lets you edit KML files — you can add new locations, change labels, or adjust routes. If you need to make changes to the map data, Google Earth is a better choice than Google Maps, which is primarily for viewing.

Opening a KML file on Windows (right-click method)

On Windows, right-click the KML file and look at the "Open with" option. If you have Google Earth or another mapping program installed, it should appear in the list. Click it to open the file. If you see only Notepad or generic text editors, that means no mapping software is installed on your computer yet.

If no mapping program appears, you have two choices: install Google Earth (free, from earth.google.com) or use Google Maps online instead. Installing Google Earth takes about five minutes. After installation, right-click the KML file again and Google Earth should now appear in the "Open with" menu.

If you want to use a different mapping program, you can also right-click, select "Open with," and then click "Choose another app." This shows all programs on your computer. If you have QGIS or ArcGIS Explorer installed, they will appear here. Select the program you want to use and check the box that says "Always use this app to open .kml files" if you want Windows to remember your choice.

Opening a KML file on Mac (double-click or drag)

On a Mac, double-clicking a KML file usually opens it in Google Earth automatically if Google Earth is installed. If nothing happens, the file may not have the correct file type label. Try dragging the KML file directly onto the Google Earth icon in your Applications folder or Dock.

If you don't have Google Earth installed, download it free from earth.google.com. The Mac version installs the same way as any other Mac software. Once installed, double-clicking KML files will open them in Google Earth by default.

If you prefer to use Google Maps instead, open your web browser, go to maps.google.com, and follow the import steps described in the Google Maps section above. This method works identically on Mac and Windows.

Using QGIS or ArcGIS Explorer for more detailed work

If you need to edit the KML file, analyze the map data in detail, or combine it with other geographic information, professional mapping software like QGIS or ArcGIS Explorer can open KML files. QGIS is free and open-source. ArcGIS Explorer is free but made by Esri, a company that specializes in mapping software.

Both programs are more complex than Google Earth or Google Maps, but they give you more control over how the data is displayed and what you can do with it. Download QGIS from qgis.org or ArcGIS Explorer from Esri's website. After installation, open the program and use the "File" menu to open or import your KML file.

Most people don't need these programs. Use them only if Google Maps or Google Earth doesn't do what you need, or if someone specifically asked you to work with KML files in a professional or technical context.

Troubleshooting when a KML file won't open

If you double-click a KML file and nothing happens, the most common reason is that no mapping software is installed on your computer. Install Google Earth (free) or use Google Maps online instead. Both are reliable and work with almost all KML files.

If you see an error message saying the file is corrupted or unreadable, the KML file itself may be damaged. Ask the person who sent it to you to send it again, or try downloading it again if you got it from a website. Occasionally files get corrupted during download or email transfer.

If the file opens but the map looks wrong — locations are in the wrong place, or nothing displays at all — the KML file may have been created by specialized software that uses features Google Maps and Google Earth don't support. Try opening it in QGIS instead. If QGIS also can't read it, contact the person who created the file and ask what software they used.

Frequently Asked Questions

Can I open a KML file in Excel or Word?

Technically yes — KML files are text, so you can open them in any text editor. But you'll see code instead of a map. This is only useful if you need to edit the raw data or troubleshoot the file. For viewing the map, use Google Maps or Google Earth instead.

What's the difference between KML and KMZ files?

KMZ is a compressed version of KML — it's a KML file zipped up to make it smaller. Most mapping software opens both the same way. If you have a KMZ file, try double-clicking it or uploading it to Google Maps just like you would a KML file.

Can I convert a KML file to a different format?

Yes. Google Earth and QGIS both let you export KML files to other formats like GPX, GeoJSON, or Shapefile. Open the KML file in either program, then use the "Export" or "Save As" option in the File menu and choose a different format.

Do I need an internet connection to open a KML file?

Google Maps requires internet. Google Earth works offline once it's installed, though satellite imagery loads faster with internet. QGIS and ArcGIS Explorer work offline. If you're in an area without reliable internet, install Google Earth or QGIS on your computer first.

Why does my KML file open in Notepad instead of a map program?

Windows is set to open KML files with a text editor by default when no mapping software is installed. Install Google Earth, then right-click the KML file, select "Open with," and choose Google Earth. Check the box to make it the default program for KML files going forward.