GPX, the GPS Exchange Format, is the format nearly every map app, GPS unit and sports platform agrees on. It stores places, planned routes and recorded tracks as plain XML. You get a GPX file when you download a hiking or cycling route from a planner, export an activity from a watch platform, or save a list of places from a handheld GPS.
A format that stopped changing in 2004
GPX 1.0 was released in 2002 and GPX 1.1 on 9 August 2004. The schema is published on the TopoGrafix site, where it is maintained by Dan Foster, and it is an open standard anyone may use without a licence fee. There has been no version since. That is unusual for a 20-year-old format and it is the reason for its success: a file written today opens in software from 2005 and the other way round. Everything newer, such as heart rate, arrived through extensions and not through a new version.
Waypoints, routes and tracks
A GPX file can hold three kinds of data, and mixing them up is behind most GPX trouble.
- Waypoint (
<wpt>): a single named place, such as a summit, a hut or a parking spot. - Route (
<rte>): an ordered list of points to pass, usually planned in advance. A route may contain only the turns, and the device is expected to work out the path between them. - Track (
<trk>): the path itself, point by point, divided into segments. A recorded activity is a track, and each point normally carries a time.
Coordinates are decimal degrees in WGS 84, elevation is in metres, times are UTC in ISO 8601 form. Only latitude and longitude are compulsory. The schema fixes the order of the optional elements, so <ele> must come before <time>. Strict software rejects a file that has them the other way round.
Heart rate, cadence and temperature are not part of GPX. They travel in the <extensions> block of a track point, most often as Garmin's TrackPointExtension with hr, cad and atemp. This needs GPX 1.1, because version 1.0 has no extensions element. GPX knows nothing about laps, calories or the sport. Those belong to TCX and FIT.
How to open a GPX file
- In a browser: Google My Maps imports GPX, and so do most route planners and sports platforms, including Strava and Garmin Connect.
- Windows, macOS, Linux: GPXSee (free, open source) for a quick look with elevation and speed graphs, Google Earth Pro, Garmin BaseCamp or QGIS for real editing.
- Android and iPhone: Organic Maps imports GPX tracks and works offline. GPXSee also runs on Android.
- Text editor: a GPX file is readable text, which helps when you only need to check whether the points have times.
Common GPX problems
Strava rejects the GPX file
Strava requires a time on every track point. A route drawn in a planner has no times, so it cannot be uploaded as an activity.
The route shows as straight lines on the device
The file contains a route with a few points, and the device connects them directly because it has no map to calculate the way. Export the plan as a track, which contains every bend.
GPX file has no heart rate
Either the export wrote GPX 1.0, or the program that reads the file ignores extensions. Open the file in an editor and search for hr. If it is there, the data is fine and the viewer is the problem.
How to add power to a GPX file
Garmin's track point extension has no field for watts. Strava detects a power tag placed directly in <extensions>, but that is a convention, not a standard. For power data, TCX and FIT are the dependable formats.
Converting GPX
GPX to KML is for Google Earth. Our converter puts waypoints in one folder and tracks in another. Every track becomes a line that follows the terrain, plus one placemark per track point with its time, altitude, speed and heading, so you can click through the journey. The KML is several times larger than the GPX, and the descriptions use feet and miles per hour. KMZ, the zipped form, is offered too. See GPX to KML.
GPX to TCX produces a course with heart rate and cadence kept at the points and a name cut to 15 characters. In the other direction, TCX to GPX and FIT to GPX write GPX 1.1. KML to GPX turns placemarks into waypoints and paths into tracks, but a drawn KML path has no times, and styles, folders, polygons and image overlays have no equivalent in GPX. Files up to 100 MB are accepted, ten at once.
GPX at a glance
| Full name | GPS Exchange Format |
|---|---|
| Published by | TopoGrafix (schema maintained by Dan Foster) |
| First release | GPX 1.0, 2002 |
| Current version | GPX 1.1, 9 August 2004 |
| Type | XML text, uncompressed, open standard |
| Stores | waypoints, routes, tracks; sensor data only through extensions |
| Typical use | exchanging routes and recorded tracks between apps and devices |
Sources: the GPX home page and GPX 1.1 schema documentation at TopoGrafix, the PRONOM entry of the UK National Archives and Strava's upload documentation.