GPX Format: Complete Guide to GPS Tracks
GPX (GPS Exchange Format) is the universal format for GPS data exchange. It is understood by all navigators, sports applications, and mapping software. If you record tracks, plan routes, or share waypoints — you work with GPX.
GPX File Structure
GPX is XML with a clear structure. A file contains three main data types:
Waypoints (wpt) — individual points: landmarks, rest stops, mountain passes.
<wpt lat="55.7558" lon="37.6176">
<name>Red Square</name>
<ele>156</ele>
<desc>Main square of Moscow</desc>
<sym>City</sym>
</wpt>
Tracks (trk) — recorded routes with timestamps. A track consists of segments (trkseg), each segment being a sequence of points.
<trk>
<name>Embankment run</name>
<trkseg>
<trkpt lat="55.7450" lon="37.6050">
<ele>130</ele>
<time>2026-03-15T08:00:00Z</time>
</trkpt>
<trkpt lat="55.7455" lon="37.6080">
<ele>131</ele>
<time>2026-03-15T08:00:15Z</time>
</trkpt>
</trkseg>
</trk>
Routes (rte) — planned routes without timestamps. The navigator chooses the road between points on its own.
GPX for Sports and Hiking
Most sports applications work with GPX:
- Strava — import and export workouts. Upload GPX via "Upload Activity" or export your tracks.
- Komoot — plan hiking and cycling routes. Import GPX for navigation.
- Wikiloc — the largest database of tourist routes. All tracks available in GPX.
- AllTrails — hiking routes with elevation profiles.
For hiking, GPX is indispensable: download the route in advance, and the navigator will guide you even without internet. This is especially important in mountains where cellular coverage is unavailable.
Importing GPX to Devices
Garmin
- Connect the navigator to your computer via USB.
- Copy the .gpx file to the
Garmin/GPX/folder on the device. - Restart the navigator — the route will appear in "Trip Planner" or "Track Manager".
For the Edge series (cycling computers), use Garmin Connect: upload GPX via the browser and sync with the device.
OsmAnd
- Copy the .gpx file to
Android/data/net.osmand/files/tracks/. - Or open the file via "Share" on Android — OsmAnd will pick it up automatically.
- In the app: My Places -> Tracks -> select the file -> "Show on map".
Strava
- Go to strava.com -> "Upload Activity".
- Drag and drop the .gpx file into the upload window.
- Strava will automatically calculate speed, elevation gain, and other metrics.
Exporting GPX from OpenStreetMap
OpenStreetMap contains road networks, trails, bike paths, and POIs worldwide. On osm2cdr.ru you can export any region to GPX:
- Select an area on the map (city, district, route).
- Choose GPX format.
- Receive a file with roads, trails, and points of interest.
The exported GPX contains: - All roads and trails as tracks (classified: highway, track, path). - POIs as waypoints (cafes, shops, landmarks). - Elevation data (when available in OSM).
For navigation tasks, also consider Garmin IMG and OsmAnd OBF formats — they contain the full road network with routing capabilities.
Useful Tools
- GPXSee — desktop application for viewing tracks with elevation profiles.
- gpx.studio — web-based GPX editor with a visual interface.
- GDAL/OGR — convert between GPX and other formats:
ogr2ogr output.gpx input.kml. - gpsbabel — universal GPS data converter supporting 160+ formats.
Export routes from OpenStreetMap at osm2cdr.ru and load them onto any device for offline navigation.