Guide

THE TOOLBOX / MAPS & GEOSPATIAL

GPX to KML Converter —
Convert GPX, Google Earth KML & GeoJSON Locally.

Drop or paste any GPX, KML, or GeoJSON file to convert between formats instantly, preview your 2D route and elevation profile, trim start/end privacy points, and download cleanly.

Samples & Units
Off
2D ROUTE & ELEVATION PROFILE6 waypoints
Max 1290 mMin 1025 m
Distance
3.212 km
Elev. Gain
+310 m
Elev. Loss
−45 m
Points
6
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <Placemark>
      <name>Segment 1</name>
      <LineString>
        <coordinates>7.9052,46.5775,1025 7.911,46.5812,1088 7.9184,46.5855,1164 7.9245,46.589,1240 7.931,46.592,1195 7.938,46.5955,1290</coordinates>
      </LineString>
    </Placemark>
  </Document>
</kml>

GEOSPATIAL FORMAT COMPARISON

Comparing GPX, KML, and GeoJSON coordinate standards.

FormatSyntaxCoordinate OrderPrimary Ecosystems
GPX 1.1XMLlat, lon (+ <ele>)Garmin, Strava, AllTrails, Komoot, Gaia GPS
KML 2.2XMLlon,lat,altGoogle Earth, Google My Maps, QGIS
GeoJSON (RFC 7946)JSON[lon, lat, alt]Mapbox, Leaflet, MapLibre, PostGIS, GitHub

1. Accurate Haversine Distance & Elevation

Every loaded track is measured across great-circle WGS-84 arcs to report total distance (km/mi), cumulative elevation gain and loss, and min/max altitude.

2. Protect Home Coordinates Before Sharing

Use the Home Privacy Zone Trim slider before exporting to remove the first and last waypoints of your ride or hike without opening a desktop GIS editor.

Frequently Asked Questions

How do I convert GPX to KML for Google Earth or Google My Maps?

Drop or paste your .gpx track above, keep "Google Earth KML" selected, and click "Download .kml." You can import the resulting KML file directly into Google Earth Web, Google Earth Pro, or Google My Maps.

Can I convert KML or GeoJSON back into GPX for Garmin or Strava?

Yes. Drop any .kml or .geojson file and switch the output tab to "GPX 1.1" to generate a clean GPS Exchange Format file with latitude, longitude, and elevation tags.

What does the Home Privacy Zone Trim slider do?

Trimming 1 to 10 trackpoints from both the start and end of your track strips your home driveway or trailhead coordinates before you share the converted KML or GeoJSON publicly.

Why does KML order coordinates as longitude,latitude instead of latitude,longitude?

GPX stores attributes as lat="..." lon="...", whereas both KML (<coordinates>lon,lat,ele</coordinates>) and GeoJSON ([lon, lat, ele]) follow the mathematical X,Y (longitude first, latitude second) convention. This converter handles the axis swap automatically.

Does the converter preserve elevation data?

Yes. Elevation values in meters are parsed from GPX <ele>, KML coordinate triples, and 3D GeoJSON coordinates, plotted in the live elevation profile, and preserved in every exported format.

Are my GPS tracks uploaded to a server?

No. All XML/JSON parsing, Haversine distance math, privacy trimming, and file exports run 100% locally in your browser.