Home
GPX vs KML
GPX Guides · Formats

GPX vs KML
& Friends.

Every mapping tool seems to want a different file. This guide compares the GPS formats you'll actually run into, what each one is good at, and when to convert between them.

TrailX Guides · Updated

The comparison table

GPS file formats compared
FormatEncodingStoresBest forWatch out for
GPXXML textWaypoints, routes, tracks; elevation and time per pointSharing trails between devices and appsNo styling; extension data may be lost between apps
KMLXML textPoints, lines, polygons, styles, folders, overlaysGoogle Earth, Google My MapsCoordinates are lon,lat order; time needs Google's gx:Track extension
KMZZipped KMLSame as KML plus bundled images and iconsSharing styled Google Earth contentMust be unzipped by the app that reads it
TCXXML textActivities (laps, heart rate, cadence) or courses with course pointsGarmin training tools and fitness platformsStrict schema: short name limits, timestamps expected
GeoJSONJSON textPoints, lines, polygons with free-form propertiesWeb maps (Leaflet, Mapbox), GIS, developersNo standard field for per-point timestamps
CSVPlain text tableOne row per point: lat, lon, optional elevation, time, nameExcel, Google Sheets, data analysisNo standard column names; apps guess
FITBinaryActivities, courses, sensor and device dataGarmin and other fitness devicesNot human-readable; not supported by the TrailX converter

GPX: the interchange format

GPX (GPS Exchange Format) was designed for exactly one job: moving GPS data between programs. It stores waypoints, routes and tracks, with optional elevation and UTC time on every point, and nothing else. That narrow focus is its strength: Garmin, Suunto, Wahoo, Coros, Strava, Komoot, Gaia GPS, OsmAnd and nearly every other outdoor tool can read it. If you are downloading a trail to follow, GPX is almost always the right choice.

KML and KMZ: built for Google Earth

KML grew out of Keyhole, the company Google acquired to build Google Earth, and became an Open Geospatial Consortium standard in 2008. Where GPX describes where, KML also describes how it looks: line colours and widths, custom icons, polygons for areas, photo overlays and nested folders. KMZ is a zip archive containing a KML plus any images it uses.

The practical difference: KML is the better format for presenting a map, GPX is the better format for navigating one. A handheld GPS doesn't care what colour your line is, but it does need a clean track. That's why the most common conversion is KML/KMZ to GPX, and why styling and polygons are lost on the way.

A detail that causes bugs

KML (and GeoJSON) list coordinates as longitude,latitude, while GPX uses separate lat and lon attributes. Hand-edited files that swap the order put your trail in the wrong hemisphere. A proper converter handles this for you.

TCX and FIT: the Garmin fitness formats

TCX (Training Center XML) was created by Garmin for its training software. It models workouts rather than maps: activities are split into laps with heart rate, cadence and calories, and courses are routes with optional course points (named cues along the way). Some fitness platforms and older Garmin tools still prefer TCX courses.

The TCX schema is strict. Course names are limited to 15 characters and course point names to 10, and each track point is expected to carry a time. When the TrailX converter writes TCX from a source without timestamps, it fills in placeholder times five seconds apart so importers accept the file, and it shortens names to fit the limits.

FIT(Flexible and Interoperable Data Transfer) is Garmin's compact binary format and what most modern watches and bike computers record natively. It's efficient, but you can't open it in a text editor. Garmin Connect and most training platforms import and export FIT directly; the TrailX converter does not read or write it, so export GPX from your platform instead.

GeoJSON: for web maps and developers

GeoJSON (standardised as RFC 7946) represents geographic features as JSON, which makes it the native language of web mapping libraries like Leaflet, Mapbox GL and OpenLayers, and of most GIS tools. A trail is a LineString feature, a campsite is a Point, and each can carry any properties you like. The catch for GPS use is that GeoJSON has no standard place for per-point timestamps, so converting a recorded GPX to GeoJSON keeps the line and elevation but not the timing.

CSV: when you need a spreadsheet

A CSV track is one row per point. It's ideal for analysing a route in Excel or Google Sheets, or for building a track from surveyed coordinates. There's no official column layout, so tools look for headers they recognise. The TrailX converter reads common header names such as lat/latitude, lon/lng/longitude, ele/elevation and time, and writes CSV with the columns Latitude, Longitude, Elevation, Time, Name, Description and Type.

What survives a conversion

Converting between formats means translating through what they have in common. The TrailX converter reads every format into the same simple model: a line of points (latitude, longitude, optional elevation and time) plus named waypoints (with optional description, elevation and time). Anything outside that model is left behind. In practice:

  • Always kept: the shape of the line, waypoint positions and names, and elevation when the source has it.
  • Kept only between time-aware formats: per-point timestamps survive GPX, TCX and CSV output. KML output is written as a plain path and GeoJSON has no standard time field, so timing is not carried into either.
  • Not kept: KML styles, polygons and overlays; TCX laps and heart-rate data; GPX extension fields; and separate tracks, which are merged into one line.

The practical rule: convert from your richest original each time, rather than chaining conversions (GPX to KML to GeoJSON and back), so nothing is lost along the way.

Which format should you use?

  • Following a trail on a GPS device or outdoor app: GPX.
  • Showing a route in Google Earth or sharing a styled map: KML or KMZ.
  • Loading a course into a fitness platform that asks for it: TCX (or FIT, exported from the platform itself).
  • Putting a trail on a website or into GIS software: GeoJSON.
  • Crunching numbers: CSV.

Rule of thumb

Keep an original GPX of every route you care about. It's the most widely supported format, and you can always convert a copy to whatever a particular tool wants. Every trail on TrailX can be exported as GPX, KML, KMZ, GeoJSON, TCX or CSV by signed-in users.