KML to GPX Converter

Convert Google Earth KML to GPX for Garmin, Strava and mapping apps

Free KML to GPX converter that runs entirely in your browser. Extracts Placemarks, Points, LineStrings and Polygons from KML and emits standards-compliant GPX 1.1. Handles MultiGeometry and nested folders — your location data never leaves your device. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What does the converter do with KML Points?

Each Point inside a Placemark becomes a GPX waypoint (wpt) with the latitude and longitude split out of the KML coordinate tuple, plus the Placemark name and description if present.

KML (Keyhole Markup Language) is Google Earth’s format, while GPX (GPS Exchange Format) is what Garmin devices, Strava, Komoot and most GPS apps import. This free converter remaps one to the other entirely in your browser, so you can move a route out of Google Earth and onto your watch without uploading your private tracks anywhere.

How it works

The converter walks the KML document and rebuilds it as GPX:

  1. DOMParser reads the KML and collects every Placemark, no matter how deeply nested inside Folder elements.
  2. For each Placemark it inspects the geometry, including each child of a MultiGeometry:
    • a Point becomes a GPX waypoint (wpt),
    • a LineString becomes a track (trktrksegtrkpt),
    • a Polygon outer ring is exported as a track too, since GPX has no polygon type.
  3. KML coordinate tuples are lon,lat,ele; the tool splits them and writes GPX’s separate lat and lon attributes plus an ele child — handling the order swap for you.
  4. Everything is wrapped in a GPX 1.1 root with the correct namespace.

The lon/lat coordinate swap

The single most common cause of GPX files appearing in the wrong place is the coordinate ordering difference between the two formats:

  • KML stores each point as longitude, latitude, elevation (x, y, z)
  • GPX uses named attributes lat="..." and lon="..." (y first in attributes, but explicit)

If you convert KML to GPX by a naive text search-and-replace, the coordinates appear transposed — points land in their mirrored location on the globe. This converter reverses the order and assigns the values to the correct named attributes automatically.

What gets carried across

KML elementGPX output
Point Placemarkwpt waypoint with name and description
LineString Placemarktrk with one trkseg of trkpt points
Polygon (outer ring)trk (GPX has no polygon type)
MultiGeometryEach child geometry converted separately
Elevation from coordinateele element on each waypoint or track point
Placemark namename element in the output
Placemark descriptiondesc element in the output

Styles, icons, and extended data in KML have no GPX equivalent and are not included in the output — GPX is a slimmer format focused on geometry and metadata.

Worked example

A KML Placemark like:

<Placemark><name>Summit</name>
  <Point><coordinates>16.3738,48.2082,171</coordinates></Point>
</Placemark>

becomes a GPX waypoint with lat="48.2082" lon="16.3738" and <ele>171</ele> — note that KML’s first number is longitude. If an imported route appears mirrored or in the wrong hemisphere, a lon/lat swap is almost always the cause, and this tool gets the order right.

All processing is local; your KML never leaves your browser.