KML to GPX converter
Turn a route you drew in Google My Maps or Google Earth into a GPX file for your Garmin, bike computer or hiking app. KMZ files work too. Free, and no account needed.
Convert KML to GPX online, in your browser
The Spatibase KML to GPX converter turns KML and KMZ files from Google My Maps or Google Earth into GPX 1.1, in your web browser. What carries over:
- Waypoints and tracks. Placemarks become waypoints, lines become tracks, and areas become closed tracks along their outline.
- Kept: names, descriptions (as plain text), altitude and the point times of a Google Earth gx:Track.
- Dropped: ExtendedData fields, folders and styles, because GPX has no place for them.
- Nothing is uploaded. Files up to 50 MB, no account.
How to convert KML to GPX
- Export the map. In Google My Maps, open the three-dot menu, choose Export to KML/KMZ and pick the layer with your route. In Google Earth Pro, right-click the folder or path under Places and choose Save Place As.
- Drop the .kml or .kmz file on the box above, or press Choose a file. Or try the sample to see how Barcelona places, a walking route and three areas come out.
- Check the map and the notes under it: they count the areas that became tracks and name the fields GPX leaves out.
- Press Download GPX. Import it as a course in Garmin Connect, or open it in Komoot, OsmAnd, Gaia GPS or any app that reads GPX.
What happens to your KML in the GPX
| What | What happens |
|---|---|
| Placemarks (points) | Waypoints (wpt), with name, description and the time of a TimeStamp if there is one. |
Lines (LineString) | Tracks (trk), one track segment per part of the line. |
Google Earth tracks (gx:Track) | Tracks with a time on every point. |
Areas (Polygon) | A closed track along the outer edge. GPX has no areas, and holes are left out. |
| Altitude | Written as the elevation (ele) of each point. |
| Descriptions | Plain text: HTML formatting is removed, and links keep only their text. |
ExtendedData fields and folders | Left out: GPX has a fixed set of fields per point. The notes name every field that was dropped. |
| Icons, colours and line widths | Left out. GPS apps draw their own symbols. |
Track or route: what your GPS does with the file
GPX stores a line in one of two ways, and a GPS treats them differently:
- Lines become tracks. A GPX track (
<trk>) is your line point by point. A watch or GPS app shows it as a trail to follow and doesn’t change it. - A route is different. A GPX route (
<rte>) is a short list of turn points, and the device plans the way between them itself, so it can leave the line you drew. That’s why the converter writes tracks.
Want turn prompts? Import the GPX as a course in Garmin Connect (Courses → Import) and send it to the device. Most Garmin watches and Edge bike computers can then guide you along it.
Why fields go missing. GPX stores the same few fields for every point: name, desc, cmt, ele, time, sym and type. Anything else in your KML, such as an ExtendedData opening_hours, has no place in the file. Download CSV keeps every field if you need them elsewhere.
Convert KML to GPX with GPSBabel
GPSBabel reads simple KML (placemarks and paths) and writes GPX in one command:
gpsbabel -i kml -f route.kml -o gpx -F route.gpx
# a KMZ is a zip: take the KML out first
unzip -o route.kmz doc.kml && gpsbabel -i kml -f doc.kml -o gpx -F route.gpxGPSBabel’s own documentation warns that nested folders, styles and HTML in names or descriptions can confuse it. This converter reads the KML with @tmcw/togeojson instead, which copes with My Maps and Google Earth files as they are.
Questions about converting KML to GPX
How do I get a Google My Maps route onto my Garmin?
In My Maps, open the three-dot menu, choose Export to KML/KMZ and pick the layer. Convert the file here to GPX, then import it in Garmin Connect as a course and send it to your watch or bike computer.
Can Garmin Connect import KML files?
No. Garmin Connect imports GPX, FIT and TCX, not KML, so a route from Google Earth or My Maps needs converting first. GPX is the one to choose for courses.
Why did my areas turn into lines?
GPX only has points and lines. An area becomes a closed track along its outer edge, so you can still follow the boundary on a GPS. Holes inside an area are left out.
Are ExtendedData fields and folders kept in the GPX?
No. GPX has a fixed set of fields for each point (name, description, comment, elevation, time, symbol and type), so other fields and folder names are dropped. The notes under the map list them, and Download CSV keeps them all.
Does it convert KMZ to GPX too?
Yes. Drop the .kmz as it is and the converter reads the KML inside. Photos and custom icons packed in the KMZ don’t come along, because GPX can’t hold them.
Moving the places into Spatibase? Read how to import your data. Need another pair of formats? The GIS file converter converts between all of them.