GPX file format
A GPX file is a text file for GPS data. It holds recorded tracks, planned routes and waypoints, and hundreds of apps and websites can open it.
- Full name
- GPS Exchange Format
- Extension
- .gpx
- Type
- XML text
- Current version
- GPX 1.1, from 2004
- Published by
- TopoGrafix, as an open standard
Open a GPX file in the GPX viewer. It runs in your browser, and the file never leaves your device.
What a GPX file can store
| Data | GPX |
|---|---|
| Recorded tracks | Yes |
| More than one track | Yes |
| Track segments | Yes |
| Planned routes | Yes |
| Waypoints | Yes |
| File name and title | Yes |
| Description | Yes |
| Author | Yes |
| Creation time | Yes |
| Links | Yes |
| Track names | Yes |
| Activity type | Yes |
| Elevation | Yes |
| Timestamps | Yes |
| Heart rate | With an extensionGarmin TrackPointExtension |
| Cadence | With an extensionGarmin TrackPointExtension |
| Power | With an extensionGarmin PowerExtension, not read by every app |
| Temperature | With an extensionGarmin TrackPointExtension |
| Speed | With an extensionGarmin TrackPointExtension v2 |
This table comes from the code of TrackLoupe, and the notes say how each field is stored. The converters use the same table to tell you what a conversion keeps and what it loses.
What is inside a GPX file
A GPX file is XML, so any text editor shows its content. Under the root element <gpx> it holds three kinds of data:
- Waypoints (
<wpt>) are single points, such as a summit or a car park, with a name and often a symbol. - Routes (
<rte>) are ordered lists of points to follow, usually drawn when planning a trip. Each point is a<rtept>. - Tracks (
<trk>) are the paths a GPS device recorded. A track holds one or more segments (<trkseg>), and each segment holds points (<trkpt>). The format asks for a new segment whenever the device loses the signal or is switched off.
Every point has a latitude and a longitude in decimal degrees, on the WGS84 datum that GPS uses. Elevation (<ele>) is in metres. Time (<time>) is a date and time such as 2026-03-14T09:30:05Z, where the Z means UTC. A <metadata> section at the top can hold the name of the file, a description, the author, a copyright notice and the creation time.
This is a short GPX file with a track of three points:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="TrackLoupe" xmlns="http://www.topografix.com/GPX/1/1">
<metadata>
<name>Morning ride</name>
</metadata>
<trk>
<name>Morning ride</name>
<trkseg>
<trkpt lat="38.7139" lon="-9.1394">
<ele>45.2</ele>
<time>2026-03-14T09:30:00Z</time>
</trkpt>
<trkpt lat="38.7142" lon="-9.1388">
<ele>46.0</ele>
<time>2026-03-14T09:30:05Z</time>
</trkpt>
<trkpt lat="38.7146" lon="-9.1381">
<ele>47.1</ele>
<time>2026-03-14T09:30:10Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
Heart rate, cadence and power in GPX
GPX 1.1 has no field for sensor data. Apps add it through extensions, which the format allows inside an <extensions> element. The most common is Garmin’s TrackPointExtension. It adds heart rate (hr), cadence (cad) and air temperature (atemp), and version 2 adds speed. Power has no agreed place: some apps write Garmin’s PowerExtension, and others a plain <power> element. TrackLoupe reads all of them.
An app that does not know an extension skips it. A GPX file can lose its heart rate this way when it passes through an app that keeps only the positions.
GPX 1.0 and GPX 1.1
GPX 1.0 came out in 2002 and GPX 1.1 in 2004. Most files today are GPX 1.1. TrackLoupe reads both, and it reads files in other text encodings too, such as the Windows-1252 that some older programs write.
How to open a GPX file
- In your browser: drop it on the GPX viewer. It shows the track, the elevation profile, the distance and the time, and the file stays on your device.
- In Google My Maps: My Maps imports GPX files up to 40 MB as a layer of a map.
- In Google Earth: Google Earth on the web imports KML and KMZ files and not GPX, so the file has to become KML first.
- In a text editor: any editor opens it, because GPX is plain text.
When to use GPX
GPX is the usual choice for moving a route or a track between GPS apps and devices, because so many of them read it. Another format fits better in two cases:
- For Google Earth and for maps with colours, icons and areas, use KML. The GPX vs KML page compares the two.
- For training data with laps, use TCX or FIT. The GPX vs TCX page explains what laps add.
Questions
How do I open a GPX file?
Drop it on the GPX viewer in any recent browser, on a computer or a phone. To read the XML itself, open the file in a text editor.
Can Google Maps open a GPX file?
Google My Maps can import a GPX file as a layer of a custom map, for files up to 40 MB.
Is a GPX file the same as a KML file?
They are different formats, and both are XML text. GPX is made for GPS data, with a time on every point. KML is made for showing places, lines and areas in Google Earth, with styles. The GPX vs KML page compares them field by field.
Does a GPX file store heart rate?
Only through an extension, usually Garmin’s TrackPointExtension, inside each track point. The table above lists every field a GPX file can hold.
Why does my GPX file have no times?
The file probably holds a planned route. Routes drawn on a map have positions and sometimes elevation, but no times, because nobody has travelled them yet.