Complete Guide to GPX Files: Everything You Need to Know
Learn what GPX files are, how they work, and how to use them for tracking routes and activities. Comprehensive guide covering GPX format, compatible apps, and conversion options.
What is a GPX file? GPX (GPS Exchange Format) is an open XML-based file format for storing GPS data including waypoints, tracks, and routes. GPX files are the universal standard for sharing location data between GPS devices, mapping applications, and fitness platforms.
This guide covers everything you need to know about working with GPX files.
What GPX Files Contain
GPX files store geographic data in a human-readable XML format. Here's what they can include:
Waypoints
Individual points of interest with coordinates:
- Latitude and longitude
- Elevation (optional)
- Name and description
- Timestamp (optional)
Tracks
Recorded paths showing where you've been:
- Sequence of track points with coordinates
- Timestamps for each point
- Elevation data
- Speed (via extensions)
Routes
Planned paths for navigation:
- Sequence of route points
- Turn-by-turn waypoints
- Names and descriptions
GPX File Structure
GPX files use XML structure that's both machine-readable and human-readable:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="YourApp">
<metadata>
<name>My Route</name>
<time>2024-12-08T10:00:00Z</time>
</metadata>
<trk>
<name>Morning Run</name>
<trkseg>
<trkpt lat="51.5074" lon="-0.1278">
<ele>11</ele>
<time>2024-12-08T10:00:00Z</time>
</trkpt>
<!-- More track points -->
</trkseg>
</trk>
</gpx>
This readable format is one reason GPX is so widely supported—any developer can easily implement GPX import/export.
GPX vs Other Formats
| Feature | GPX | FIT | TCX | KML |
|---|---|---|---|---|
| Format Type | XML (text) | Binary | XML (text) | XML (text) |
| File Size | Medium | Small | Medium | Medium |
| Human Readable | Yes | No | Yes | Yes |
| GPS Focus | Primary | Secondary | Secondary | Primary |
| Sensor Data | Extensions | Native | Native | Limited |
| Universal Support | Excellent | Good | Good | Good |
When to Use GPX
- Sharing routes: GPX is the most universally accepted format
- Route planning: Most mapping apps export GPX
- Cross-platform use: Works with virtually all GPS apps
- Backup: Human-readable format for long-term storage
- Editing: Can modify routes in any text editor
When to Use Other Formats
- FIT: For Garmin devices and full sensor data
- TCX: For structured workout data with laps
- KML: For Google Earth visualization
For detailed comparisons, see: FIT vs GPX: When to Use Each Format
How to Create GPX Files
From Fitness Apps
Most fitness platforms can export GPX:
Strava:
- Open the activity
- Click the three dots (...)
- Select "Export GPX"
Garmin Connect:
- Open the activity
- Click the gear icon
- Select "Export to GPX"
Komoot:
- Open the tour
- Click "More"
- Select "Download GPX"
From Route Planning Tools
Create routes and export as GPX:
- Komoot: Plan routes and download GPX
- RideWithGPS: Create routes with elevation data
- Strava Route Builder: Design and export routes
- Google My Maps: Create custom routes (export as KML, convert to GPX)
From GPS Devices
Most GPS devices save tracks as GPX or can export to GPX:
- Garmin: Export from device or Garmin Connect
- Wahoo: Sync to app, export GPX
- Suunto: Export from Suunto app
How to View GPX Files
Desktop Applications
| Application | Platform | Cost | Features |
|---|---|---|---|
| Google Earth | Win/Mac/Linux | Free | 3D visualization, satellite imagery |
| GPX Editor | Windows | Free | Edit waypoints, split/merge tracks |
| GPXSee | Win/Mac/Linux | Free | Lightweight viewer with maps |
| QGIS | Win/Mac/Linux | Free | Professional GIS analysis |
Mobile Apps
| App | iOS | Android | Cost |
|---|---|---|---|
| Strava | ✅ | ✅ | Free/Premium |
| Komoot | ✅ | ✅ | Free/Premium |
| ViewRanger | ✅ | ✅ | Free/Premium |
| GPX Viewer | ✅ | ✅ | Free |
| Gaia GPS | ✅ | ✅ | Free/Premium |
Online Viewers
- GPS Visualizer (gpsvisualizer.com) - Free online GPX viewer
- GPX.Studio - Edit and view GPX files online
- Strava - Upload GPX to view with metrics
For detailed app reviews, see: Best Apps for Viewing GPX Files
How to Edit GPX Files
Since GPX is XML-based, you can edit it in multiple ways:
Text Editor
Open in any text editor (Notepad, VS Code, etc.) to:
- Change route names
- Delete waypoints
- Modify coordinates
- Fix timestamps
Dedicated GPX Editors
- GPX Editor (Windows): Visual editing with map
- GPXSee: View and basic editing
- GPX.Studio: Online editor with drawing tools
Common Edits
Remove Privacy-Sensitive Start/End: Delete the first and last few track points to hide your home location.
Split Long Tracks: Divide a multi-day trip into separate files.
Merge Multiple Tracks: Combine several activities into one route.
Converting GPX Files
GPX to FIT
Convert GPX routes for Garmin devices:
Use case: Upload a planned route from Komoot to your Garmin watch
Tool: GPX to FIT Converter
The converter adds timing data based on your specified average speed, creating a FIT file compatible with Garmin devices.
See: How to Convert GPX to FIT
FIT to GPX
Convert Garmin activities to shareable GPX:
Use case: Share your Garmin workout on platforms that only accept GPX
Tool: FIT to GPX Converter
See: How to Convert FIT to GPX
Other Conversions
- GPX to TCX - For Training Center format
- GPX to KML - For Google Earth
- GPX to ZWO - For Zwift workouts
- KML to GPX - Convert Google Earth files to GPX
GPX Extensions
The GPX format supports extensions for additional data:
Garmin Extensions
<extensions>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>145</gpxtpx:hr>
<gpxtpx:cad>85</gpxtpx:cad>
</gpxtpx:TrackPointExtension>
</extensions>
Supports: Heart rate, cadence, temperature, power
Common Extension Data
| Data | Extension Namespace | Support |
|---|---|---|
| Heart Rate | gpxtpx | Wide |
| Cadence | gpxtpx | Wide |
| Power | gpxtpx | Limited |
| Temperature | gpxtpx | Wide |
| Speed | gpxtpx | Moderate |
Note: Not all apps read extensions. For guaranteed sensor data transfer, consider FIT or TCX formats.
Platform Compatibility
GPX files work with virtually every GPS and fitness platform:
Fitness Platforms
| Platform | Import GPX | Export GPX |
|---|---|---|
| Strava | ✅ | ✅ |
| Garmin Connect | ✅ | ✅ |
| Komoot | ✅ | ✅ |
| RideWithGPS | ✅ | ✅ |
| TrainingPeaks | ✅ | ✅ |
| MapMyRide | ✅ | ✅ |
| Wahoo | ✅ | ✅ |
GPS Devices
| Device | GPX Support |
|---|---|
| Garmin (all models) | ✅ |
| Wahoo | ✅ |
| Suunto | ✅ |
| Polar | ✅ |
| Coros | ✅ |
| Bryton | ✅ |
| Lezyne | ✅ |
Mapping Software
| Software | GPX Support |
|---|---|
| Google Earth | ✅ (via import) |
| OpenStreetMap | ✅ |
| Caltopo | ✅ |
| AllTrails | ✅ |
| Gaia GPS | ✅ |
Common GPX Issues and Solutions
File Won't Import
Possible causes:
- Corrupted XML structure
- Missing required elements
- Encoding issues
Solutions:
- Validate XML structure online
- Check for special characters in names
- Ensure file has .gpx extension
Missing Elevation Data
Cause: Source didn't record elevation or used GPS-only elevation
Solutions:
- Use a service to add elevation from terrain data
- GPX.Studio can add elevation automatically
- Some apps recalculate elevation on import
Track Points Missing
Cause: Very long tracks may be truncated by some apps
Solutions:
- Split into smaller segments
- Reduce track point density
- Check app's import limits
Timestamps Missing
Cause: Route files (planned routes) don't include timestamps
Solutions:
- Convert GPX to FIT with our converter (adds timing)
- Use GPS Visualizer to add timestamps
- Some apps add timestamps on import
Best Practices
For Sharing Routes
- Remove personal start/end points for privacy
- Add descriptive names and descriptions
- Include waypoints for key locations
- Test the file imports correctly before sharing
For Backup
- Keep original GPX files from devices
- Store in multiple locations (cloud + local)
- Organize by date and activity type
- GPX is ideal for long-term archival (text-based)
For Navigation
- Verify route imports to your device correctly
- Check turn points are in logical locations
- Test navigation before important trips
- Keep backup route on phone
Related Resources
Converters
- FIT to GPX Converter - Convert Garmin files to GPX
- GPX to FIT Converter - Convert GPX for Garmin devices
- GPX to KML Converter - For Google Earth
- GPX to TCX Converter - For Training Center format
Guides
- How to Convert FIT to GPX
- How to Convert GPX to FIT
- How to Convert KML to GPX
- Complete Guide to KML Files
- FIT vs GPX: When to Use Each Format
- Best Apps for Viewing GPX Files
- Complete Guide to Garmin FIT Files
Summary
GPX is the universal standard for GPS data exchange. Its XML-based, human-readable format makes it:
- Universal: Works with virtually all GPS apps and devices
- Flexible: Easy to edit, split, merge, and convert
- Reliable: Text format ensures long-term readability
- Open: No proprietary restrictions
Whether you're sharing routes, backing up activities, or moving data between platforms, GPX provides the most compatible option for GPS data.