GPX vs KML: What's the Difference?
Both GPX and KML are XML-based formats for storing geographic data, but they serve different purposes. Here's when to use each one.
Quick comparison
| Feature | GPX | KML |
|---|---|---|
| Full name | GPS Exchange Format | Keyhole Markup Language |
| Created by | Topografix (open standard) | Google (originally Keyhole) |
| Primary use | GPS navigation & fitness tracking | Visualization & presentation |
| GPS device support | Excellent (universal) | Limited |
| Google Earth | Supported | Native format |
| Strava / Komoot | Native import | Not supported |
| Styling (colors, icons) | Limited | Rich styling |
| Data types | Waypoints, tracks, routes | Placemarks, paths, polygons, overlays |
| Compressed variant | — | KMZ (zipped KML) |
What is GPX?
GPX (GPS Exchange Format) is an open XML standard designed for transferring GPS data between devices and software. It stores three types of data: waypoints (individual points of interest), tracks (recorded paths with timestamps), and routes (planned sequences of waypoints).
GPX is the de facto standard for GPS hardware. Every Garmin, Wahoo, Bryton, Suunto, Polar, and COROS device reads GPX files natively. Fitness apps like Strava, Komoot, AllTrails, and Ride with GPS all import and export GPX. If you need to get a route onto a GPS device, GPX is the format to use.
What is KML?
KML (Keyhole Markup Language) was developed by Keyhole, Inc. and later acquired by Google. It's the native format for Google Earth and Google My Maps. KML is more expressive than GPX — it supports rich styling (colors, line widths, icons), 3D models, image overlays, and complex polygons.
KMZ is the compressed version of KML (a ZIP file containing a KML file and any referenced images). Google My Maps exports in KMZ format by default.
When to use GPX
- Importing routes into Garmin, Wahoo, Bryton, Suunto or any GPS device
- Uploading activities to Strava, Komoot, AllTrails, Ride with GPS
- Sharing routes with other cyclists, hikers, runners, or motorcyclists
- When you need universal compatibility across devices and apps
- Recording and analyzing GPS tracks with elevation and heart rate data
When to use KML
- Visualizing data in Google Earth or Google My Maps
- Creating styled maps with custom icons, colors, and overlays
- Sharing geographic data that includes polygons, boundaries, or regions
- Embedding maps in presentations or websites
Converting between GPX and KML
If you have a Google Maps route and need a GPX file (the most common scenario), use gmaps2gpx to convert directly. For converting between existing GPX and KML files, gpx.studio and GPS Visualizer both handle format conversion.
Bottom line
Use GPX if you want to navigate a route on a GPS device or share it with fitness apps. Use KML if you want to create styled visualizations in Google Earth. For most people converting Google Maps routes for outdoor activities, GPX is the right choice — it's supported everywhere that matters.
Need a GPX file from Google Maps?
Convert now with gmaps2gpx →