GPS Exchange Format
GPX (GPS Exchange Format) is an XML schema for storing waypoints, tracks, and routes recorded by GPS devices and fitness applications.
GPS data format. Conversion to other geo formats requires coordinate transformation not available in browser.
Common questions
How do I open and view a GPX file on a map?
Drag the GPX file into Google Earth Pro, QGIS, or the web app gpx.studio to see tracks plotted on a map. Google Earth Pro renders tracks as 3D paths with elevation. Since GPX is plain XML, you can also open it in any text editor to read raw coordinates directly.
Can I merge multiple GPX files into one?
Yes. GPXSee and gpsbabel both support merging. With gpsbabel, run `gpsbabel -i gpx -f file1.gpx -i gpx -f file2.gpx -o gpx -F merged.gpx` to combine tracks from both files. The merged output preserves all waypoints, tracks, and routes from each source.
Why does my GPX file show a straight line instead of a smooth track?
This usually means the file contains route points rather than track points, or the GPS recorded at very low frequency. Route points represent planned waypoints connected by straight segments, while track points capture the actual path traveled. Check whether the data is inside `<rte>` elements versus `<trk>` elements.
What coordinate system does GPX use?
GPX uses WGS84 decimal degrees for latitude and longitude, the same datum used by consumer GPS receivers. Elevation values in `<ele>` tags are meters above the WGS84 ellipsoid. No coordinate projection is applied; values are raw geographic coordinates.
What makes .GPX special
GPS Exchange Format files store geographic coordinates, elevation, and timestamps in a standardized XML structure that nearly every mapping and fitness application can read. GPX files are pure XML with a mandatory namespace (http://www.topografix.com/GPX/1/1), and every compliant GPX file contains exactly one <gpx> root element with creator and version attributes -- making XML schema validation a reliable integrity check.
Continue reading — full technical deep dive
Core Elements
Three primary elements carry spatial data. Waypoints (<wpt>) represent individual named locations with latitude and longitude attributes. Tracks (<trk>) contain one or more track segments (<trkseg>), each holding an ordered sequence of track points (<trkpt>) that record a path traveled over time. Routes (<rte>) define planned navigation paths as ordered route points (<rtept>). Each point type can include child elements for elevation (<ele> in meters above WGS84 ellipsoid) and UTC timestamps (<time> in ISO 8601).
Extensions and Vendor Data
The <extensions> element at both file and point level provides a controlled mechanism for vendor-specific data. Garmin adds heart rate and cadence sensors through its TrackPointExtension namespace. Strava embeds power meter readings. Komoot attaches turn-by-turn navigation hints. Because extensions live in their own XML namespaces, parsers that do not recognize them can safely skip the data without breaking.
Schema Validation
The official XSD at topografix.com defines every legal element and attribute. Running a GPX file through an XML schema validator catches common corruption: missing required attributes, out-of-range coordinates (latitude beyond +/-90), or malformed timestamps. Tools like xmllint perform this check in a single command.
Producer Ecosystem
Garmin handhelds and cycling computers export GPX natively. Strava, Komoot, and AllTrails offer GPX downloads for recorded activities. Desktop software like QGIS and Google Earth Pro import GPX layers directly. The format's simplicity -- plain text, no binary sections, human-readable coordinates -- makes it straightforward to edit or merge files with basic text processing tools.
Related Formats
Technical reference
- MIME Type
application/gpx+xml- Developer
- TopoGrafix
- Year Introduced
- 2002
- Open Standard
- Yes — View specification
Binary Structure
A UTF-8 XML document beginning with an XML declaration, a <gpx> root element specifying the GPX 1.1 namespace and schema location, followed by optional metadata, then waypoint, route, and track elements containing coordinate attributes and child data.
Attack Vectors
- XML External Entity (XXE) injection if a parser resolves external DTD references embedded in the GPX prologue
- Billion-laughs style entity expansion causing memory exhaustion in parsers that expand internal entities without depth limits
Mitigation: FileDex does not parse, render, or execute these files. Reference page only.