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

DataGPX
Recorded tracksYes
More than one trackYes
Track segmentsYes
Planned routesYes
WaypointsYes
File name and titleYes
DescriptionYes
AuthorYes
Creation timeYes
LinksYes
Track namesYes
Activity typeYes
ElevationYes
TimestampsYes
Heart rateWith an extensionGarmin TrackPointExtension
CadenceWith an extensionGarmin TrackPointExtension
PowerWith an extensionGarmin PowerExtension, not read by every app
TemperatureWith an extensionGarmin TrackPointExtension
SpeedWith 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:

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

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:

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.