A KML file stores map locations and routes that you can open in Google Maps or other mapping software
KML stands for Keyhole Markup Language. It is a file format — like .pdf or .jpg — that holds geographic information: points on a map, lines connecting those points, shapes, and labels. When you save a map location, draw a route, or mark multiple addresses, you often end up with a KML file.
The most common reason you will see a KML file is when you read a map from Google Maps, Google Earth, or a similar service. You might also receive one from someone else — a hiking trail, a list of addresses, a property boundary — and need to open it on your own computer or phone.
KML files are plain text underneath, which means they are small, portable, and work across different devices and programs. You do not need special software to create one or read one, though you do need the right program to view it as a map rather than as code.
Key Takeaways
- A KML file is a map file that contains locations, routes, or shapes you can view in Google Maps, Google Earth, or other mapping programs.
- You can create a KML file by saving or exporting a map from Google Maps, or by downloading one that someone else created and shared with you.
- KML files are text-based and small in size, making them straightforward to email, store, and move between devices.
- To open a KML file, you upload it to Google Maps, Google Earth, or another mapping program — you do not open it like a regular document.
- KML files are useful for organizing and backing up map data because they preserve all your marked locations and routes in one portable file.
How KML files store map information
Inside a KML file is a list of coordinates (latitude and longitude), along with names, descriptions, and other details about each location. If you mark five addresses on a map and save it as KML, the file contains the exact coordinates of all five, plus any notes you added.
The file also preserves the visual style of your map — colors, icons, line thickness — so when you open it again, it looks the way you left it. This makes KML useful for organizing map data: you can create separate files for different projects, trips, or purposes, and each one stays organized the way you set it up.
Where KML files come from
You create a KML file when you export or read a map from Google Maps or Google Earth. In Google Maps, you can save a map you have built (with marked locations and routes) by clicking the menu and selecting "Export to KML." Google Earth lets you save placemarks and paths the same way.
You may also receive a KML file from someone else — a colleague sharing a list of office locations, a friend sending a hiking route, a real estate agent providing property boundaries. These files are often shared by email or cloud storage because they are small and work on any device.
Some websites and services also let you read map data as KML. City planning departments, hiking apps, and real estate platforms sometimes offer KML downloads so you can view their data in your own mapping software.
How to open a KML file
Do not try to open a KML file by double-clicking it in your file manager. Instead, upload it to a mapping program. Google Maps is the most straightforward option: go to Google Maps, click the menu, select "Create a new map," then click "Import" and choose your KML file. The map will appear with all your locations and routes intact.
Google Earth works similarly: open Google Earth, go to File > Import, and select your KML file. The locations will appear on the globe. Other mapping programs like ArcGIS, Mapbox, and OpenStreetMap also accept KML files, though the import process varies slightly.
On a phone or tablet, you can open a KML file by uploading it to Google Maps through the mobile app, or by using a dedicated mapping app that supports KML. Some apps let you email yourself the file and open it directly from the email attachment.
Why KML files matter for backing up map data
If you have spent time building a map — marking favorite restaurants, planning a road trip, organizing property locations — a KML file is how you preserve that work. Without it, your map exists only in Google Maps or Google Earth, and if you lose access to that account or the service changes, your data could be lost.
Exporting to KML is a form of backup. You own the file, can store it wherever you want (your computer, cloud storage, an external drive), and can open it in any mapping program. This protects you from depending on a single service or account.
KML files are also useful for sharing maps with others without requiring them to have a Google account or access to your personal maps. You can send the file to a colleague, family member, or client, and they can open it in their own mapping software when ready.
KML vs. other map file formats
KML is the most common format for sharing maps, but other formats exist. GPX (GPS Exchange Format) is popular for hiking and outdoor activities because it stores elevation and time data. GeoJSON is used by web developers and data scientists. Shapefile is common in professional mapping and geographic information systems.
For most people, KML is the right choice because it works with Google Maps and Google Earth, which are free and widely available. If you are working with a specialized mapping tool or need features that KML does not support, your software will usually tell you which format to use.
You can convert between formats using online tools or desktop software, so if you receive a map in a different format, you can usually convert it to KML to open it in Google Maps.
Storing and organizing KML files
Treat KML files like any other important document: store them in a folder on your computer or in cloud storage, and back them up to a second location. A folder structure like "Maps / Travel" or "Maps / Work Projects" keeps them organized if you create multiple files.
Cloud storage services like Google Drive, Dropbox, or OneDrive work well for KML files because they are small and you can access them from any device. You can also store them on an external hard drive as part of a broader backup strategy.
Name your KML files clearly — "NYC_restaurants_2024.kml" is more useful than "map.kml" — so you can find the right one later. If you share KML files with others, include a brief note about what the map contains and when it was last updated.
Frequently Asked Questions
Can I edit a KML file after I read it?
Yes. You can open it in Google Maps, add or remove locations, change colors or labels, and save the updated version. You can also edit the raw text of a KML file in a text editor if you know the format, but Google Maps is easier for most people.
What if someone sends me a KML file and I do not know what it contains?
Open it in Google Maps or Google Earth to see the locations and routes it contains. The file name usually gives a hint — "hiking_trails.kml" or "client_addresses.kml" — but opening it is the only way to see the actual data.
Will a KML file work on my phone?
Yes. You can upload a KML file to Google Maps on your phone by opening the app, creating a new map, and importing the file. Some dedicated mapping apps also accept KML files directly. The process is slightly different on iPhone and Android, but both support KML.
Can I convert a KML file to a different format?
Yes. Online conversion tools can change KML to GPX, GeoJSON, or other formats. Search "convert KML to [format]" and you will find several free options. Your mapping software may also have an export option that lets you save in a different format.
Is a KML file safe to share with others?
KML files contain only the location data you put in them — no passwords, account information, or private data unless you explicitly added it. You can safely share a KML file by email or cloud storage. If the map contains sensitive locations, review it before sharing to make sure you are comfortable with what it reveals.