How to use it
- Export your map or path from Google Earth, Google My Maps or another app as KML or KMZ.
- Choose or drop the file here.
- Check the counts of waypoints and tracks.
- Download the GPX file or copy its text.
How it works
The KML is parsed with your browser's XML parser; a KMZ is unzipped first and its main KML (doc.kml or the first .kml) is used. Every Placemark is read regardless of folders: a Point becomes a GPX waypoint with the placemark's name, description and TimeStamp; a LineString or a stand-alone LinearRing becomes a track; a Google gx:Track becomes a track whose points keep their timestamps (when) and altitude; a gx:MultiTrack or a MultiGeometry with several lines becomes one track with several segments. A Polygon becomes a track that follows its outer boundary, because GPX has no polygons; inner boundaries (holes) are dropped.
The output is GPX 1.1 with lat/lon to 7 decimal places (about 1 cm), elevation in metres and times in UTC. Coordinates outside the valid latitude and longitude ranges are skipped. KML altitude is copied as it is, even when the KML altitude mode is relative to ground.
Examples
Google My Maps route to a Garmin
Export a My Maps layer as KML or KMZ, convert it and copy the GPX to the device: drawn lines become tracks and pins become waypoints.
Recorded Google Earth track
A KML with a gx:Track keeps every point's time and altitude, so sports apps can show speed and elevation after the conversion.
Frequently asked questions
Are my placemark names and descriptions kept?
Yes. Names become GPX name elements and descriptions become desc elements. HTML inside a description is kept as text.
Why does my track have no times?
Only gx:Track data and Point TimeStamps carry times in KML. Plain LineStrings have no timestamps, so their GPX points have none either.
Can it read KMZ files with photos?
Yes. The photos and icons in the KMZ are ignored; only the coordinates and texts are converted.
What happens to polygons?
Each polygon becomes a track along its outer boundary, marked with the type 'polygon'. Holes inside polygons are not converted.
Privacy
The KML or KMZ file is read and converted in your browser. Your locations are not uploaded or stored, and only an anonymous event that the tool was used is counted.