What Is a
GPX File?
GPX is the closest thing the outdoor world has to a universal language for GPS data. Here's what the format actually contains, why almost every navigation app supports it, and what to do when you've been sent one.
TrailX Guides · Updated
GPX in one paragraph
GPX stands for GPS Exchange Format. It was published by TopoGrafix in 2002 as an open schema so that GPS receivers and mapping software could swap data without proprietary formats getting in the way. The current version, GPX 1.1, dates from 2004 and is still what virtually every app writes today. Because a GPX file is plain XML, you can open it in any text editor and read it: it is simply a list of coordinates wrapped in descriptive tags. That openness is why a hike recorded on a Garmin watch can be uploaded to Strava, edited in a desktop tool and followed later in a phone app.
What's inside a GPX file
A GPX document has a single <gpx>root element. Inside it you'll find an optional <metadata> block (name, description, author, creation time) and any combination of the three core data types:
| Element | What it is | Typical use |
|---|---|---|
<wpt> | A single named point: a summit, campsite, water source or fuel stop. | Points of interest you want marked on the map. |
<rte> / <rtept> | An ordered list of route points. The receiving device works out the path between them. | Turn-by-turn style routes with only a handful of points. |
<trk> / <trkseg> / <trkpt> | A track made of one or more segments, each a dense sequence of points. | Recorded activities and detailed trail lines you follow exactly. |
Every point carries lat and lon attributes in decimal degrees on the WGS 84 datum, the same system GPS itself uses. Optional child elements add <ele> (elevation in metres), <time> (an ISO 8601 timestamp in UTC), <name>, <desc> and <sym> (a symbol hint). Here is a minimal but valid example with one waypoint and a two-point track:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="TrailX"
xmlns="http://www.topografix.com/GPX/1/1">
<metadata>
<name>Ridge Loop</name>
</metadata>
<wpt lat="46.55812" lon="7.93541">
<ele>2061</ele>
<name>Hut</name>
</wpt>
<trk>
<name>Ridge Loop</name>
<trkseg>
<trkpt lat="46.55790" lon="7.93470">
<ele>2054.2</ele>
<time>2026-07-14T07:02:11Z</time>
</trkpt>
<trkpt lat="46.55801" lon="7.93502">
<ele>2057.8</ele>
<time>2026-07-14T07:02:26Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>Extensions
GPX 1.1 includes an <extensions>element where vendors add their own data. The most common is Garmin's TrackPointExtension, which stores heart rate, cadence and temperature on each track point. Apps that don't understand a given extension simply ignore it, so the core geometry still loads everywhere, but those extra fields may be lost when a file passes through a tool that doesn't know about them.
Tracks vs routes: the difference that trips people up
The most common GPX confusion is between a track and a route. A track is a breadcrumb trail: hundreds or thousands of closely spaced points that describe exactly where someone went. A route is a short list of via points, and the device or app decides how to connect them, usually by snapping to its own road or path network.
- Use a track when the exact line matters: an off-road trail, a faint mountain path, a route across open terrain that no routing engine knows about.
- Use a route when you want the device to recalculate and give turn prompts along known roads or paths.
- If an app imports your file but shows nothing, check which type it contains. Some apps only display tracks, others only routes.
What GPX files are used for
- Sharing trails. Guidebooks, clubs and trail databases publish GPX downloads so you can load the line onto your own device. Every public trail on TrailX can be exported as GPX by signed-in users.
- Recording activities. GPS watches, bike computers and phone apps export recorded hikes, rides and drives as GPX tracks with timestamps and elevation.
- Planning. Route planners let you draw a line on a map and export it as GPX to follow on the trail. See how to create a GPX route.
- Analysis. Because each point may carry elevation and time, a GPX track can be turned into distance, climb, gradient and moving-time statistics, which is exactly what the TrailX analysis engine does.
How to open a GPX file
Double-clicking a GPX file usually opens it in a text editor or browser, which shows raw XML rather than a map. To actually see the line, open it in software that draws GPS data. Quick options:
- Desktop: free apps such as GPXSee or Google Earth Pro, or a GIS package like QGIS.
- Browser: Google My Maps can import a GPX file as a map layer; free web editors such as gpx.studio display and edit it.
- Phone:use an outdoor navigation app that imports GPX; Google Maps and Apple Maps don't open GPX files directly.
For platform-by-platform steps, read how to open a GPX file and using GPX on iPhone and Android.
A privacy note on recorded GPX files
A recorded GPX track is a precise log of where you were and when. If you start recording at your front door, the first points of every shared file reveal your home address, and the timestamps show your routine. Before publishing or sending a recorded file, trim the start and end, or share a planned route (which has no timestamps) instead. Tools that process files locally, like the TrailX converter, let you reformat a file without handing it to a server.
GPX compared with other formats
GPX is not the only GPS format. KML/KMZis Google Earth's format and is better at styling and map overlays. TCXis Garmin's training format, built around laps and workouts. GeoJSONis the web-developer standard for map data. GPX sits in the middle: it is focused purely on points, routes and tracks, which is why it's the default choice for moving navigation data between devices. Our GPX vs KML comparison covers the differences in detail.
Common GPX problems
- No elevation: files exported from some planners contain no
<ele>values, so the elevation profile will be blank until an app adds terrain data. - Too many points: older devices cap the number of points per track; very dense recordings may need simplifying before upload.
- Wrong type: a file containing only waypoints may import as a scatter of pins rather than a line.