GPS Exchange Format
A GPX file is GPS data in XML — recorded tracks, waypoints, and planned routes stored in the WGS 84 coordinate system used by GPS satellites themselves. Created by TopoGrafix in 2002, the specification has not been revised since August 2004.
GPX conversion is not yet available in FileDex. For now, use the CLI commands in the Developer Door to convert between GPS formats with GPSBabel or gpxpy.
Common questions
What is a GPX file?
GPX (GPS Exchange Format) is an XML format for storing waypoints, tracks, and routes recorded by GPS devices and fitness apps. Created by TopoGrafix in 2002, GPX uses the WGS 84 coordinate system — the same datum used by GPS satellites. Every major mapping app, GPS device, and fitness platform supports GPX as the universal GPS data interchange format.
How do I view a GPX file on Google Maps?
Google Maps has limited direct GPX support. Import your GPX file into Google My Maps (mymaps.google.com) via the Import button — it displays waypoints and tracks on the map. For full GPX visualization with elevation profiles and track analysis, use Google Earth Pro (free desktop app) or web tools like GPXSee.
What is the difference between GPX and KML?
GPX is a data format — it stores raw coordinates, tracks, and routes for interchange between devices and apps. KML is a presentation format — it adds styling, colors, icons, 3D views, and screen overlays for visualization in Google Earth. Use GPX for exchanging GPS data; use KML for creating visual map presentations.
How do I protect my privacy when sharing GPX files?
GPX files contain precise GPS coordinates that reveal your start location (often your home), end location, and daily patterns. Before sharing, use your fitness app's privacy zone feature to trim start and end points. Strava, Garmin Connect, and Komoot all offer configurable privacy zones that hide coordinates near specified addresses.
Can I merge multiple GPX files into one?
Most GPS applications support merging GPX files. Garmin BaseCamp, GPSBabel, and online tools like GPX Studio combine multiple tracks into a single file. The merged file contains all waypoints, tracks, and routes from the source files. For automated merging, see the Technical Reference below.
How do I prevent my GPX tracks from revealing my home address?
Before uploading any track to a public platform, trim the start and end points near your home and workplace. Garmin Connect, Strava, Komoot, and Ride with GPS all offer privacy zones — radius-based masking around configurable addresses. For one-off public sharing, strip the first and last 100-300 meters manually in GPSBabel or a text editor since GPX is plain XML. A trimmed track still tells a clear story without showing where you live.
What makes .GPX special
A GPX file is a plain-text XML document that arrived in 2002 and has not been revised since 2004. It describes what every GPS device on earth records: where you went, where you stopped, where you planned to go. The rest of GPX's evolution happened inside one XML element that no one anticipated at the time.
Continue reading — full technical deep dive
A GPX File Knows Three Things About You. What Are They?
A GPX file knows three things about you: where you stopped, where you went, where you planned to go.
Waypoints (<wpt>) are individual points — a parking spot, a trailhead, a place you want to remember. Each has a lat and lon attribute and optional children for elevation (<ele>), timestamp (<time>), name, and description. Tracks (<trk>) are recorded paths — where the GPS receiver actually went. A track contains one or more <trkseg> segments (to represent GPS signal loss or intentional pauses), and each segment contains ordered <trkpt> track points. Routes (<rte>) are planned navigation paths — where you intend to go, containing <rtept> route points.
A recorded track is history. A route is a plan. A waypoint is a landmark. The format does not confuse the three, and neither do the applications that read it. That clarity is why GPX became the default export format for Garmin watches, Strava activities, AllTrails guides, and OpenStreetMap traces — the data model maps directly to how users think about the places they keep. The model is simple. The coordinates inside it are not.
Every Consumer Map on Earth Speaks the Same Coordinate System. Why?
Your phone's GPS speaks one coordinate system. So does GPX. So does every consumer map on the internet.
All GPX coordinates use the World Geodetic System 1984 — the same datum that the GPS satellite constellation uses. Latitude ranges from -90° to +90°, longitude from -180° to +180°, stored as decimal degrees directly on the lat and lon attributes. Six decimal places give approximately 11 centimeters of precision — well beyond the 3-5 meter accuracy consumer GPS receivers typically achieve. Google Maps, Apple Maps, and OpenStreetMap all use WGS 84 natively, which means GPX files load into them without any coordinate transformation.
The elevation story is more complicated. GPX's <ele> value is meters above the WGS 84 ellipsoid, not above mean sea level. GPS-derived altitudes are typically off by 10-30 meters without a barometric altimeter (Garmin, Wahoo, and Suunto devices add one). And tracks that cross the International Date Line can render as straight lines across an entire map in tools that do not handle antimeridian wrapping — a surprisingly common bug in early web mapping libraries. That's the coordinate system. What the devices write on top of it is where the format evolved without ever changing the spec.
GPX Has Not Changed in 22 Years. Why Does It Still Express Everything a Modern Watch Measures?
A 90-minute run produces a GPX file with 5,000 timestamps, your heart rate sampled every second, and the air temperature when you started. None of that is in the GPX 1.1 spec.
GPX 1.1's most significant addition was a single element called <extensions>. It appears as an optional child of the root <gpx>, of waypoints, of tracks, of segments, and of individual track points. Extensions use custom XML namespaces to carry vendor-specific data without modifying the core schema. The Garmin TrackPointExtension v2 schema adds heart rate (<gpxtpx:hr>), cadence (<gpxtpx:cad>), temperature (<gpxtpx:atemp>), and speed — data that every fitness-oriented export now carries. Strava adds power measurements in watts. Komoot adds terrain type. Every Wahoo bike computer, Suunto watch, and Polar heart rate monitor writes similar extension blocks.
The core spec hasn't moved since August 2004. The data inside it has been evolving constantly. When a 22-year-old format can still express everything a modern fitness watch measures, it's because the format shipped an escape hatch — and the ecosystem used it.
Garmin also ships FIT, a binary alternative that is 3-5× smaller than equivalent GPX. A 10-hour cycling activity produces roughly 5 MB in GPX and 1-1.5 MB in FIT. But FIT is proprietary, requires the Garmin SDK to parse, and does not render in a text editor. For cross-device, cross-app, or cross-platform interchange, GPX still wins. GPX is also where data exposure happens — with stakes that go far beyond fitness apps.
A 13 KB XML File Exposed Military Bases Worldwide. How?
In November 2017, Strava published a global heatmap aggregating every GPS track its users had ever uploaded — anonymized, but visualized. Two months later, a graduate student at the Australian National University noticed distinct jogging patterns in the middle of the Syrian desert: running routes inside bases that did not officially exist.
A single GPX file is 13 KB of XML. The Strava heatmap was 3 TB of tiles. Both describe the same thing: someone moved through a place, and the coordinates were recorded. The compression changed. The information did not.
Every GPX file contains three streams a reader can cross-reference: precise coordinates (6 decimal places ≈ 11 cm accuracy), timestamps (every second on most fitness devices), and the creator attribute that names the device or app that produced the file. Combine any two of them across multiple files from the same person and you have enough to identify home, work, commute, and daily patterns. Garmin extensions add heart rate and cadence. Strava adds power.
The Strava incident forced two industry changes. Fitness platforms added privacy zones — radius-based location hiding around configurable addresses. Garmin Connect, Strava, Komoot, and Ride with GPS now offer the feature; users have to opt in. Defense organizations globally issued directives against fitness tracking in sensitive locations — the US Department of Defense, UK Ministry of Defence, and NATO partners all published guidance after 2018.
The format did nothing wrong. GPX records exactly what the device told it to record, accurately. The privacy problem lives one level up — in what users share and where that sharing defaults to public. A .gpx file shared publicly without trimming is an intimate dataset in a small, readable XML envelope.
.GPX compared to alternatives
| Formats | Criteria | Winner |
|---|---|---|
| .GPX vs .KML | Purpose GPX is data-focused — it stores coordinates, tracks, and routes for interchange. KML is presentation-focused — it adds styling, placemarks, 3D views, and screen overlays. GPX for data exchange, KML for visualization. | Draw |
| .GPX vs .KML | File size GPX uses minimal XML with coordinates as attributes. KML adds presentation markup that inflates file size. For raw GPS data transfer, GPX produces smaller files. | GPX wins |
| .GPX vs .FIT | File size FIT (Garmin's binary format) is 3-5× smaller than equivalent GPX data. A 10-hour cycling activity produces roughly 5 MB in GPX but only 1-1.5 MB in FIT. Binary encoding eliminates XML tag overhead. | FIT wins |
| .GPX vs .FIT | Interoperability GPX is readable by every mapping app, GPS device, and text editor. FIT is a proprietary Garmin binary format requiring the FIT SDK to parse. GPX is the universal exchange format; FIT is optimized for Garmin's ecosystem. | GPX wins |
Technical reference
- MIME Type
application/gpx+xml- Developer
- TopoGrafix
- Year Introduced
- 2002
- Open Standard
- Yes — View specification
Binary Structure
GPX is a plain-text XML format with no binary structure or magic bytes. A valid GPX 1.1 file begins with an XML declaration (<?xml version="1.0" encoding="UTF-8"?>), followed by a <gpx> root element specifying version="1.1", a creator attribute, and the GPX 1.1 namespace (xmlns="http://www.topografix.com/GPX/1/1"). Inside the root element: optional <metadata> (document name, author, time, bounds), zero or more <wpt> waypoints with lat/lon attributes, zero or more <trk> tracks containing <trkseg> segments of <trkpt> track points, and zero or more <rte> routes containing <rtept> route points. The <extensions> element can appear inside the root, waypoints, tracks, segments, or route points for vendor-specific data.
GPX conversion is not yet available in FileDex. For now, use the CLI commands in the Developer Door to convert between GPS formats with GPSBabel or gpxpy.
Attack Vectors
- XML External Entity (XXE) injection
- XML entity expansion (billion laughs)
- Location privacy exposure
Mitigation: Before sharing GPX publicly, trim start and end coordinates using your app's privacy zones. For server-side processing, disable DTD parsing to prevent XXE and cap entity expansion to block billion-laughs attacks. Treat any GPX from an unknown sender like any geolocation dataset. FileDex does not parse GPX — this page is static, no upload.
- Specification GPX 1.1 Schema — TopoGrafix (Canonical XSD)
- Documentation TopoGrafix GPX Format Documentation
- Documentation Garmin TrackPointExtension v2 Schema
- History GPS Exchange Format — Wikipedia