GPX vs KML — Which Should You Use?
GPX and KML both describe places on Earth as XML, and both can hold a path you walked. They are not interchangeable in practice. GPX is what most GPS devices and outdoor apps exchange. KML is what Google Earth and Google Maps speak when you want placemarks, folders, and styles. Choosing wrong usually means “file won’t open,” not a subtle quality difference.
This page is the decision guide. Structure details live on What is a GPX file? and What is a KML file?—this page will not re-dump those schemas.
GPX vs KML in one minute
| GPX | KML | |
|---|---|---|
| Home turf | Watches, handhelds, trail and training apps | Google Earth, Google Maps, GIS overlays |
| Typical contents | Tracks, routes, waypoints with time/elevation | Placemarks, paths, polygons, styles, camera views |
| File style | GPS exchange XML | Earth markup XML (often shipped as KMZ) |
| When stuck | Convert KML → GPX for devices | Convert GPX → KML for Earth |
If you are loading a route onto a GPS or sharing a hike with a running club, start with GPX. If you are building a colored tour with photos in Earth, start with KML.
When GPX wins
GPX wins whenever the consumer is a GPS-centric tool:
- Recording and replaying an activity with timestamps.
- Sending a track to a watch or handheld that lists “GPX” in its import menu.
- Editing a path (trim, split, simplify) in /gpx-editor.
- Keeping elevation and time attached to each track point for pace or climb analysis.
Sports platforms that store richer sensor data often keep FIT internally and still offer GPX when you need a portable path. For that pipeline see FIT files.
When KML wins
KML wins when presentation and Earth features matter:
- Organizing many placemarks in folders.
- Drawing polygons (property boundaries, airspace sketches) with styles.
- Attaching icons, descriptions, and camera/tour views for Google Earth.
- Sharing a map package that is meant to be opened in Earth or Maps, not on a watch.
KML can represent a path (LineString) that looks like a GPX track on screen, but device firmware rarely wants that packaging. Convert before syncing to hardware.
What each file typically contains (short)
GPX (typical): wpt waypoints, trk/trkseg/trkpt recorded tracks, optional rte routes, optional elevation and ISO time on points.
KML (typical): Placemark with Point, LineString, or Polygon; Folder/Document hierarchy; Style for colors and icons; sometimes network links or overlays.
That is enough to choose. For element-level walkthroughs, use the format pages linked above. If your download ends in .kmz, that is zipped KML—see KML vs KMZ.
Converting KML → GPX
Use this direction when Earth (or a KML email attachment) has the geometry and your watch or trail app needs GPX:
- Open /convert/kml-to-gpx.
- Drop the
.kml(or.kmz) file. - Download the resulting GPX and open it in /gpx-viewer to sanity-check the path.
Expect some Earth-only features (styles, photo overlays, camera tours) to disappear—GPX has nowhere to put them. Paths and point coordinates are what survive.
Converting GPX → KML
Use this direction when you have a clean activity or hike as GPX and want it in Earth:
- Open /convert/gpx-to-kml.
- Drop the
.gpxfile. - Open the KML in Google Earth to add styles or folders if needed.
Timestamps and elevation can be preserved depending on the converter options; fancy styling is something you add afterward in Earth, not something GPX carried in the first place.
KMZ note
KMZ is not a third geography model—it is usually a ZIP archive whose main document is doc.kml, sometimes with images beside it. Treat KMZ like KML for “GPX vs KML” decisions, then read KML vs KMZ if you need to unpack or convert the zip.
Round-trip expectations
GPX → KML → GPX (or the reverse) is useful but not lossless:
- Earth styles and folder structure vanish in GPX.
- Some KML paths lack per-point times; the GPX will too.
- GPX extensions (HR, cadence) may not map into plain KML placemarks.
Do important edits in the format that stores the fields you care about, then convert once toward the destination app.
Try it in the free converters
- /convert/kml-to-gpx — Earth package → GPS track
- /convert/gpx-to-kml — GPS track → Earth markup
- /gpx-viewer — inspect the GPX before you sync it to a device
All of these run in the browser so the file does not need to be uploaded to convert or view.