Convert GPX to KML when you have a GPS track from a watch, bike computer or hiking app and want to see it in Google Earth or another app that reads KML. This GPX to KML converter reads the track points in each GPX track segment and writes them as a KML line, keeping elevation when the GPX has it.
How to use the GPX to KML converter
- Choose a
.gpxfile. - Select Process files, or press Try an example to convert a two-point fictional track.
- Check the segment and point counts in the preview.
- Download
track.kmland open it in Google Earth or your map app.
How GPX tracks become KML lines
In GPX 1.1, a track (trk) holds one or more segments (trkseg), and each segment is a list of points (trkpt) with lat and lon attributes and an optional ele in metres. The GPX schema says all coordinates use the WGS84 datum. KML also uses WGS84, but writes each coordinate as longitude, latitude, altitude. The GPX to KML converter swaps the order for you.
Every segment becomes its own Placemark named Track 1, Track 2 and so on, holding a LineString with tessellate on so the line follows the ground. Segments stay separate, so a gap where your GPS lost signal is not drawn as a straight jump.
Worked example: a two-point track
<trkseg>
<trkpt lat="37.8" lon="-122.4"><ele>10</ele></trkpt>
<trkpt lat="37.81" lon="-122.41"><ele>12</ele></trkpt>
</trkseg>
The preview reports 1 segment and 2 points. The KML line holds -122.4,37.8,10 -122.41,37.81,12: longitude first, then latitude, then elevation.

What GPX to KML leaves out
Waypoints (wpt) and routes (rte) are not converted, only tracks. Time stamps, heart rate and other extension data are dropped because a KML line does not hold them. If you need those values in a table, the FIT to CSV converter exports them from the original FIT file. A broken GPX from a crashed recording may need the GPX repair tool first.
Common GPX to KML errors
- The file does not match the expected format or has invalid structure. The GPX is cut off or is not XML. Run it through the repair tool or export it again.
- Nothing to convert. The file holds only waypoints or a route and no track. Convert the route to a track in your GPS app first.
Privacy: your track stays in your browser
Tips before you convert
Open the track in a map viewer first and look for obvious problems such as a jump across the map, a long flat section where the device lost signal, or a straight line from your home to the start. These come from the recording, not the conversion, and they are easier to fix in the source file. If a recording is split across several files, join them first so you end up with one line. Keep the original file as a backup in case you need the timestamps later.
The GPX to KML converter runs with JavaScript in a background worker on this page. The file is read into browser memory and is not uploaded, and the result you download is built locally. If the file holds anything private, such as home locations or personal records, clear the page on a shared computer when you are done.
Tracks often start and end at home, so keep that in mind before sharing the KML. To go further, the KML to GeoJSON converter turns the result into GeoJSON.
Sources
The GPX to KML converter follows these specifications and format guides:
- TopoGrafix: GPX 1.1 schema documentation
- Google for Developers: KML reference
- Open Geospatial Consortium: KML standard
Questions about this tool
Can I open the result in Google Earth?
Yes. Google Earth opens KML files directly.
Why are longitude and latitude swapped?
GPX stores lat and lon as attributes, while KML writes coordinates as longitude, latitude, altitude. The converter puts them in KML order.
Are waypoints converted?
No. Only track segments are converted. Waypoints and routes are left out.
Is elevation kept?
Yes, when the GPX point has an ele value.
Is my track uploaded?
No. The conversion runs in your browser.
Review the supported formats and limitations before using an output file. File processing happens in your browser.