GPX (GPS Exchange Format) is what most GPS devices and apps export, while KML (Keyhole Markup Language) is what Google Earth and Google My Maps read. This free converter turns one into the other entirely in your browser, so you can view a recorded hike or drive on Google Earth without uploading your private location history to any server.
How it works
The converter parses the GPX XML and rebuilds it as KML:
- The browser’s
DOMParserreads the GPX document and finds everywpt(waypoint),trk(track) andrte(route). - Each waypoint becomes a KML point
Placemark: itslat/lonattributes and elevation become aPointwithcoordinatesinlon,lat,eleorder, and itsname/desccarry across. - Each track segment (
trkseg) and route is flattened into an ordered list of points and emitted as aPlacemarkcontaining aLineStringwith all coordinates. - The pieces are wrapped in a
kml/Documentenvelope with the correct namespace.
KML uses longitude first (lon,lat,ele), the opposite of how GPX stores attributes (lat, lon) — the tool handles that swap for you.
Tips and example
A minimal GPX waypoint like this:
<wpt lat="48.2082" lon="16.3738"><name>Vienna</name></wpt>
becomes a KML Placemark whose Point coordinates are 16.3738,48.2082,0. Note the reversed order. If your viewer shows points in the ocean off Africa, you are almost certainly feeding lat,lon into something expecting lon,lat — KML always wants longitude first.
Everything runs locally; your GPS data is never uploaded.