GPS Exchange Format (.gpx)
Topografix StandardGPS Exchange Format (GPX) is the open XML standard for sharing GPS waypoints, planned hiking routes, and recorded fitness tracks across GPS units (Garmin, Wahoo), smartphones, and activity platforms like Strava.
Convert GPX to KML
Free in-browser GPX to KML converter. Convert files instantly on your device.
Inspect & Metadata
Operating systems and file analyzers identify GPX files by inspecting the leading binary byte sequence:
Byte-Level Header Signature (Magic Bytes)
Operating systems and file analyzers identify GPX files by inspecting the leading binary byte sequence:
HEX SIGNATURE (OFFSET 0):
3C 67 70 78ASCII REPRESENTATION: <gpx
Standardization: Topografix GPX 1.1 Specification
Technical Specifications
| Container Architecture | XML schema containing Waypoints (<wpt>), Routes (<rte>), and Tracks (<trk>) composed of sequential Trackpoints (<trkpt>) |
| Compression | Uncompressed text (readily compressed with Gzip) |
| Byte Endianness | UTF-8 / Unicode text stream |
| Color Spaces | N/A (Geospatial Telemetry) |
| Channels & Structure | Latitude, Longitude, Elevation (elevation in meters), UTC timestamp, heart rate, cadence, and temperature |
| Max Dimensions | WGS 84 coordinate datum (worldwide GPS standard) |
| Transparency | None |
| Streaming & Progressive | Sequential trackpoint streaming allows continuous live GPS logging |
Technical Comparison Matrix: GPX vs Competitors
| Technical Attribute | GPX (Current) | KML | GEOJSON | FIT |
|---|---|---|---|---|
| Primary Purpose | Outdoor recreation & sports tracking | 3D Earth visualization (Google Earth) | Web mapping & GIS data | Garmin binary sports watch format |
| Timecoded Trackpoints | Native standard (<trkpt> with <time>) | Requires custom schema tags | Requires custom property timestamps | Binary timestamp records |
| File Structure | Open XML schema | Open XML schema | Open JSON format | Proprietary compact binary |
| Garmin / Strava Support | 100% universal export/import | Supported in Google Earth | Supported in web GIS | Native hardware recording format |
Common Corruption Modes & Hex Recovery Guide
Strava or Garmin Connect reports 'An error occurred with your upload: file empty or invalid'.
Root Cause: Missing unclosed </trk> or </gpx> tags caused by battery dying mid-recording.
Recovery: Repair unclosed XML tags using File2File GPX Repair Tool.
Security Analysis & Parser Attack Vectors
GPX files are XML-based and can expose private location data (home addresses) or suffer from XML entity injection.
Known Attack Vectors
- Location privacy leakage exposing sensitive home/work starting points in public workout files.
- XML External Entity (XXE) injection in fitness platform file upload handlers.
- Denial of service through million-point trackpoint files causing CPU exhaustion.
Defensive Best Practices: Disable DTD processing in GPX XML parsers and offer privacy zone trimming for home coordinates.
Historical Origins & Milestones
Key Advantages & Pros
- The undisputed global standard for outdoor recreation, hiking, running, and cycling activities.
- Chronological telemetry: trackpoints store precise UTC timestamps alongside elevation, enabling pace, speed, and grade calculations.
- Universal compatibility with Garmin, Apple Watch, Strava, Komoot, AllTrails, and Google Earth.
Technical Limitations & Cons
- Verbose XML format results in large file sizes for long multi-day GPS recordings.
- Lacks the advanced sensor data (running dynamics, cycling power balance) stored in binary Garmin FIT files.
- Text files can be easily edited or tampered with to falsify athletic performance.
Interesting Technical Trivia
- GPX coordinates always use the WGS 84 datum, which is the exact same coordinate reference system used by GPS satellites in orbit.
- Fitness watches record a trackpoint every 1 second, meaning a 3-hour marathon generates over 10,000 coordinate points in a single GPX file.
- GPX extensions allow recording personal health biometric data like heart rate (<gpxtpx:hr>) and cycling cadence directly inside the GPS track.
Frequently Asked Technical Questions
What is a GPX file?
A GPX file is a GPS data format that stores waypoints, routes, and recorded tracks (with latitude, longitude, elevation, and time) from GPS devices and fitness watches.
How can I convert a GPX file to KML for Google Earth?
You can convert any GPX workout or hiking trail into a Google Earth KML file in one click using File2File.app directly in your web browser.
How do I upload a GPX file to Strava?
Log in to Strava.com, click the '+' icon in the top right, select 'Upload activity', and choose 'File' to upload your .gpx recording.
Related GPX Conversion Pairs
Convert Garmin/Strava GPX GPS tracks and activity waypoints into 3D Google Earth KML flight paths.
Extract GPS waypoint and route trackpoints from Google Earth KML files into standard GPX format.
Convert GeoJSON LineString geometry and track coordinates into standard GPS Exchange (GPX) routes.