What is a GPX file and how do you open one?
A GPX file (GPS Exchange Format) is a plain-text XML file that stores GPS data: waypoints, planned routes and recorded tracks. Each track point holds a latitude and longitude and usually an elevation and a UTC timestamp. Almost every GPS device, mapping app and photo geotagging tool can read and write GPX.
The GPX format in brief
GPX was created by TopoGrafix as an open, vendor-neutral way to move GPS data between devices and programs. The current version is GPX 1.1, defined by an XML schema published on topografix.com. A few rules from that schema are worth knowing:
- Coordinates are decimal degrees on the WGS84 datum, the same system GPS uses.
- Measurements are metric, so elevation is in meters.
- Times are in UTC, written in ISO 8601 form such as
2026-05-14T07:02:00Z. Fractional seconds are allowed. - Extensions let apps add their own data (heart rate, speed, temperature) without breaking other readers.
Because it is text, a GPX file is easy to inspect, compress and archive, and it will still be readable long after the app that made it is gone.
Waypoints, routes and tracks
A single GPX file can hold any mix of three kinds of data. They are easy to confuse, and the difference matters when you use the file.
| Type | Element | What it is | Typical use |
|---|---|---|---|
| Waypoint | <wpt> | A single named point | A viewpoint, parking spot or campsite |
| Route | <rte> with <rtept> | An ordered list of turn points leading to a destination | A planned path to follow |
| Track | <trk> with <trkseg> and <trkpt> | A recorded path: where you actually went | A logged hike, ride or photo walk |
A route is a plan; a track is a record. Tracks usually have many more points, each with a timestamp. A track is split into segments (<trkseg>); a new segment typically starts when recording was paused or the GPS signal was lost.
What is inside a GPX file
Here is a minimal GPX 1.1 track with three points:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Example Logger"
xmlns="http://www.topografix.com/GPX/1/1">
<trk>
<name>Morning harbor walk</name>
<trkseg>
<trkpt lat="38.707612" lon="-9.136521">
<ele>12.4</ele>
<time>2026-05-14T07:02:00Z</time>
</trkpt>
<trkpt lat="38.707905" lon="-9.135874">
<ele>13.1</ele>
<time>2026-05-14T07:03:00Z</time>
</trkpt>
<trkpt lat="38.708233" lon="-9.135102">
<ele>15.0</ele>
<time>2026-05-14T07:04:00Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
Reading it from the top:
- The root
<gpx>element must carryversion="1.1"and acreatornaming the program that wrote the file. - Each
<trkpt>has requiredlatandlonattributes. Latitude runs from -90 to 90, longitude from -180 to 180. <ele>is the elevation in meters and<time>the moment the point was recorded. Both are optional in the schema, but a track without times is useless for geotagging photos.- The trailing
Zin each time means UTC.
How to open a GPX file
Any text editor (Notepad on Windows, TextEdit on macOS) will show the raw XML. To see the track on a map, use one of these.
On Windows or macOS
- Google Earth Pro: choose File > Open, set the file type to GPS, and pick the file. The import dialog asks how to convert tracks; keep the KML Tracks option if you want the timestamps preserved.
- QGIS (free, open source): Layer > Add Layer > Add GPX Layer. Waypoints, routes and tracks each load as their own layer, as described in the QGIS GPS documentation.
- Photo software: Lightroom Classic's Map module and digiKam's Geolocation Editor both load GPX tracks, because they use them to geotag photos.
In a web browser
- gpx.studio: a free, open-source online GPX viewer and editor. Open the file from its menu to see the track, elevation profile and statistics, and to crop or merge tracks.
- Google My Maps: create a map, click Import on a layer and choose the GPX file. Google lists GPX among the supported import formats.
On a phone
Phones don't preview GPX on their own; you open the file in an app that understands it. OsmAnd, for example, imports GPX on both Android and iPhone: tap the file in your Files or Downloads app and choose OsmAnd from the share or "open with" options. Most hiking and cycling navigation apps offer a similar import.
Choosing a GPX viewer
For a quick look, any of the tools above is enough. If you use GPX files regularly, check for:
- Timestamps on hover or click, so you can see when you were at each point. Many viewers only draw the line.
- Elevation profile for hikes and rides.
- Offline use and privacy. A desktop viewer keeps your track on your computer; a web viewer may upload it.
- Editing, if you need to trim the start and end of a recording or join two files.
GPX compared with KML, FIT and TCX
| Format | Type | Typical source |
|---|---|---|
| GPX | XML text | Exchanging tracks, routes and waypoints between almost any app or device |
| KML / KMZ | XML text (KMZ is zipped) | Google Earth and map display, with styling and overlays |
| FIT | Binary | Garmin and other fitness devices, with detailed sensor data |
| TCX | XML text | Garmin's Training Center format for workouts |
For photo geotagging, GPX is the format to ask for. It is the one that Lightroom Classic, ExifTool and digiKam all accept.
How photographers use GPX timestamps
A track's timestamps are what make it useful for geotagging. Your camera records when each photo was taken; the GPX track records where you were at each moment. A geotagging tool looks up each photo's capture time in the track and writes the matching coordinates into the photo, interpolating between the two nearest points.
Two practical consequences follow. First, the track must have <time> values; a planned route exported as GPX won't work. Second, because GPX times are always UTC while cameras usually record local time, the tool needs to know your camera's time zone and any clock error. The full method is in how to geotag photos, and tool-by-tool steps are in geotag photos from a GPX file.
When a GPX file won't open or looks wrong
- "Invalid file" errors. Open it in a text editor. A file that is cut short (no closing
</gpx>) was probably interrupted while saving or downloading. - A straight line instead of a path. You may have a route with only a few turn points, not a recorded track.
- Gaps in the line. Separate track segments, where recording paused or the signal dropped.
- The track is in the sea or on the wrong continent. Latitude and longitude may be swapped, or a sign is missing, which usually points to a converter bug.
Questions
- What does GPX stand for?
- GPX stands for GPS Exchange Format. It is an open XML format, published by TopoGrafix, for sharing waypoints, routes and tracks between GPS devices and software.
- How do I open a GPX file?
- Any text editor shows the raw data. To see it on a map, use Google Earth Pro or QGIS on a computer, gpx.studio or Google My Maps in a browser, or a GPX-capable app such as OsmAnd on a phone.
- What is the difference between a GPX track and a route?
- A route is a planned list of turn points leading to a destination. A track is a recording of where you actually went, usually with a timestamp on every point.
- Can I use a GPX file to geotag photos?
- Yes, if it contains a recorded track with timestamps. Lightroom Classic, ExifTool and digiKam match each photo's capture time to the track and write the matching coordinates into the photo.
Record the route of your next photo walk
ShutterRoute logs a GPS track on your iPhone or Android phone while you shoot, even offline. Export it as GPX and geotag your photos at home — no account needed.
Get the app