Skip to main content
viewmygpx

Pillar guideGPX 1.0 (2002)GPX 1.1 (2004)Stable

What is a GPX file?

Definition

A GPX file (.gpx) is an XML-based file format for storing GPS routes, tracks, and waypoints. The format was published by TopoGrafix as GPX 1.0 in October 2002 and updated to GPX 1.1 in August 2004; it has been stable since. Today every major fitness watch, bike computer, mapping app, and outdoor platform either reads or writes GPX, which is why it has become the universal way to move route data between systems.

The format encodes coordinates as decimal-degree latitude and longitude on the WGS-84 datum (EPSG:4326), with optional elevation in meters above the WGS-84 ellipsoid and optional UTC timestamps in ISO 8601. To open a GPX file, drop it into the viewer further down this page — viewmygpx parses it locally using the browser's native DOMParser and never uploads the file. The rest of this guide covers the format's data model, technical foundations, common extensions, and what you can do with a file once you have it.

Data model

What's inside a GPX file

A GPX file is plain XML text. Three top-level element types carry the actual location data: waypoints, tracks, and routes. Everything else — file metadata, vendor extensions, link references — wraps around them.

A waypoint (<wpt>) is a single named point with latitude, longitude, optional elevation, optional timestamp, and optional name and description. Geocaches, summits, parking lots, and trailheads are all common waypoints. The format does not imply movement — a waypoint is just a point.

A track (<trk>) is a recorded path. When a smartwatch or GPS unit logs a run or ride, the result is stored as one or more <trkseg> segments inside one or more <trk> tracks. Each <trkpt> includes coordinates and usually a timestamp; high-end devices add elevation, heart rate, cadence, and temperature inside an <extensions> block.

A route (<rte>) is a planned path — an ordered list of <rtept> waypoints meant for navigation. A planner like Komoot or Ride with GPS produces routes; a recorded ride produces tracks. Some files contain both.

Beyond the three element types, the file's <metadata> block can carry a name, description, author, copyright, link reference, creation time, keywords, and a bounding box (minlat, minlon, maxlat, maxlon). Vendors layer their own data inside <extensions> elements with namespace prefixes — Garmin's TrackPointExtension namespace adds heart rate, cadence, and temperature; other makers add power, depth, or air-quality readings. The schema requires only the root <gpx> element with a version attribute; everything else is optional.

A reasonable mental model: GPX is a container. Strip out everything optional and you are left with a list of points with coordinates; add timestamps and you have a recording; add planning metadata and waypoints and you have a route to follow.

History

A short history of the format

TopoGrafix — a Massachusetts company run by software engineer Dan Foster — published GPX 1.0 in October 2002. The aim was practical: every GPS handheld vendor at the time used its own incompatible binary format, and exchanging routes required vendor-specific cables and software. GPX gave the industry an open XML format anyone could parse with off-the-shelf tools.

Two years later, in August 2004, TopoGrafix released GPX 1.1. The notable addition was the <extensions> element — a structured place for vendor-specific data that did not require modifying the core schema. The 1.1 schema has been the canonical version since.

A GPX 2.0 draft circulated in 2010 with proposals for additional metadata and stricter validation, but TopoGrafix never ratified it and there are no plans to. The format is effectively frozen — and that is a feature: a file written in 2004 still parses cleanly today, and a file written today will still parse in twenty years (assuming XML 1.0 still parses; it is also frozen).

Adoption was rapid. Garmin shipped GPX import and export in BaseCamp and Connect by the late 2000s, Strava launched with GPX export in 2009, and OpenStreetMap adopted GPX as the canonical format for community-uploaded GPS traces. By the mid-2010s every major fitness platform supported it. The format remains stewarded by TopoGrafix, though in practice the schema has not changed in over twenty years.

Mechanics

The technical foundation

A GPX file is a UTF-8-encoded XML 1.0 document. The first line is the XML declaration; the second line is the <gpx> root element with required version and creator attributes plus the GPX namespace declaration. The schema is open — TopoGrafix publishes the XSD files at topografix.com/GPX/1/1/gpx.xsd (1.1) and topografix.com/GPX/1/0/gpx.xsd (1.0) — and the file format has no patents, royalties, or proprietary tooling required to read or write it.

File extension
.gpx
MIME type
application/gpx+xml — registered with IANA in September 2013.
Encoding
UTF-8, with optional byte-order mark. Per W3C XML 1.0, every conforming XML processor must accept UTF-8.
Root element
A <gpx> element with required version ("1.0" or "1.1") and creator attributes plus a namespace declaration.
Coordinate system
WGS-84 (EPSG:4326). Latitude and longitude are decimal degrees expressed as XML attributes on every wpt, rtept, and trkpt.
Coordinate precision
Up to roughly 7 decimal places (≈1.1 cm at the equator). Most consumer GPS receivers write 5–7 decimals.
Elevation
Optional <ele> element. Meters above the WGS-84 ellipsoid (not mean sea level).
Timestamps
Optional <time> element. ISO 8601 datetime, typically UTC with the Z suffix (e.g., 2026-04-28T14:23:11Z).
Schema namespace
http://www.topografix.com/GPX/1/1 (1.1) or http://www.topografix.com/GPX/1/0 (1.0).
Schema definition
TopoGrafix publishes XSD files at the same paths under topografix.com — gpx.xsd inside /GPX/1/1/ and /GPX/1/0/.

Anatomy

An annotated GPX file

The example below is a synthetic GPX 1.1 file containing one waypoint and one track segment with two trackpoints. Every line is labeled in the table beneath. The file is small enough to read in full but covers every element a typical GPS recording produces.

sunset-ridge.gpxGPX 1.1
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="viewmygpx"
     xmlns="http://www.topografix.com/GPX/1/1"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1"
     xsi:schemaLocation="http://www.topografix.com/GPX/1/1
                         http://www.topografix.com/GPX/1/1/gpx.xsd">
  <metadata>
    <name>Sunset Ridge loop</name>
    <desc>Out-and-back trail with optional spur to North Vista.</desc>
    <author><name>viewmygpx</name></author>
    <time>2025-09-14T08:23:11Z</time>
    <bounds minlat="44.21148" minlon="-110.84203"
            maxlat="44.27932" maxlon="-110.79111" />
  </metadata>
  <wpt lat="44.21221" lon="-110.83974">
    <name>Trailhead</name>
    <sym>Trailhead</sym>
  </wpt>
  <trk>
    <name>Sunset Ridge loop</name>
    <type>hiking</type>
    <trkseg>
      <trkpt lat="44.21221" lon="-110.83974">
        <ele>2104.6</ele>
        <time>2025-09-14T08:23:14Z</time>
        <extensions>
          <gpxtpx:TrackPointExtension>
            <gpxtpx:hr>112</gpxtpx:hr>
            <gpxtpx:cad>78</gpxtpx:cad>
          </gpxtpx:TrackPointExtension>
        </extensions>
      </trkpt>
      <trkpt lat="44.21228" lon="-110.83968">
        <ele>2105.1</ele>
        <time>2025-09-14T08:23:17Z</time>
      </trkpt>
      <!-- ... thousands more trackpoints ... -->
    </trkseg>
  </trk>
</gpx>
<?xml version="1.0" encoding="UTF-8"?>
Standard XML declaration. UTF-8 is the conventional encoding per the W3C XML 1.0 Recommendation.
<gpx version="1.1" creator="..." xmlns="...">
Root element. version is required (1.0 or 1.1); creator is a free-form string naming the producing app; xmlns identifies the document as GPX 1.1.
xmlns:gpxtpx="..."
Namespace prefix declaration for Garmin's TrackPointExtension v1, used inside <extensions>. Conventionally bound to the prefix gpxtpx.
xsi:schemaLocation="..."
Optional pointer to the XSD location for strict-mode XML validators. Many writers omit it.
<metadata>
File-level metadata. Sub-elements (name, desc, author, copyright, link, time, keywords, bounds) are all optional.
<bounds minlat="..." minlon="..." />
Bounding box of every coordinate in the file. Optional but useful for fast spatial pre-filtering.
<wpt lat="..." lon="...">
Standalone waypoint — a named point of interest. lat and lon are required attributes, decimal degrees on the WGS-84 datum.
<trk>
Track — a recorded path. Contains one or more <trkseg> segments. The format keeps track and route distinct.
<type>hiking</type>
Track type label. Free-form string; common values are hiking, cycling, running, mountain biking.
<trkseg>
Track segment — a contiguous recording. Splits between segments model pause/resume in a recording session.
<trkpt lat="..." lon="...">
Trackpoint — one position within a segment. lat and lon are required; everything else is optional.
<ele>2104.6</ele>
Elevation in meters above the WGS-84 ellipsoid (NOT mean sea level — a common misconception). Optional.
<time>2025-09-14T08:23:14Z</time>
ISO 8601 timestamp, conventionally UTC (the Z suffix). Optional.
<extensions>
Container for vendor-specific data. GPX 1.1 only; in 1.0, vendor elements appeared inline as namespaced children of <trkpt>.
<gpxtpx:hr>112</gpxtpx:hr>
Heart rate in beats per minute, from Garmin's TrackPointExtension v1.
<gpxtpx:cad>78</gpxtpx:cad>
Cadence — revolutions per minute on a bike, steps per minute when running.

Versions

GPX 1.0 vs GPX 1.1

The two versions look nearly identical. The differences are in how vendor data is stored.

GPX 1.0 (2002) allows extension elements directly inside <trkpt>, mixed with the core schema (TopoGrafix GPX 1.0 manual). A heart rate from a Garmin device appeared as a top-level <heartrate> child of <trkpt>, namespaced with topografix-specific extension URIs. Files validate against the 1.0 schema only if the extension elements are properly namespaced — many writers do not bother, and 1.0 files often fail strict validation.

GPX 1.1 (2004) introduced the <extensions> wrapper element. Vendor data goes inside <extensions> with its own namespace prefix; the core <trkpt> body stays clean. This is why most modern tools write 1.1 — vendor data stays interoperable without breaking the schema for tools that do not recognize it.

Practical implication: a viewer or editor will accept both versions, but a strict validator may reject 1.0 files that mix non-GPX elements without proper namespacing. If you have a choice, write 1.1.

Extensions

Standard extensions you'll see in real files

The <extensions> mechanism in GPX 1.1 is a hook for vendor-specific data. Several namespaces are widely deployed; most viewers and converters parse the standard fields and ignore extensions they do not recognize. viewmygpx surfaces the Garmin TrackPointExtension v1 fields (HR, cadence, temperature) and preserves all other extensions on round-trip conversion.

gpxtpx · TrackPointExtension v1Garmin
Heart rate (<gpxtpx:hr>), cadence (<gpxtpx:cad>), air temperature (<gpxtpx:atemp>), water temperature (<gpxtpx:wtemp>), depth (<gpxtpx:depth>), and speed (<gpxtpx:speed>). The most common extension you'll encounter; also adopted by Wahoo, Suunto, and Coros.
gpxx · GpxExtensions v3Garmin
Waypoint icon names (<gpxx:WaypointExtension>), addresses, phone numbers, and route categories. Used in Garmin BaseCamp and Connect for waypoint metadata.
groundspeak · cache extensionsGeocaching.com
Cache descriptions, hint text, log entries, and cache type labels nested inside <wpt>. Used by geocaching.com pocket-query GPX exports.
power · cycling powerStrava (de facto)
Cycling power-meter watts at each trackpoint. Several vendors implement this; there is no formal schema, but a <power> element nested inside <trkpt> is widely understood.

Capabilities

What you can do with a GPX file

Once you have a GPX file in hand, the file itself is just data. Value comes from what you do with it.

View on a map. Drop the file onto viewmygpx, Gaia GPS, or any other GPX viewer to see the route as a polyline on satellite or terrain tiles. The viewer further down this page renders the polyline plus an elevation profile and a distance summary in a couple of seconds, all in the browser.

Send it to your tracking app. Strava, Garmin Connect, Komoot, AllTrails, and Ride with GPS all accept GPX uploads. The exact path differs per platform — see the platform-specific guides at /open-gpx-in/.

Convert to a different format. Google Maps and Google Earth speak KML and KMZ, not GPX directly — see Open GPX in Google Maps and Open GPX in Google Earth for the conversion paths. Spreadsheet workflows want CSV; web maps usually want GeoJSON. The homepage viewer has Download buttons for KML, KMZ, CSV, and GeoJSON under the file summary; all conversions run in the browser. All four round-trip cleanly because the underlying data is the same — just expressed differently.

Edit the file. Trim the warm-up off a recorded ride, merge two halves of a thru-hike, reverse a route to do it the other direction, or smooth out elevation noise from a barometric altimeter. The GPX editor handles these in the browser.

Push it to a device. Cycling computers, smartwatches, and handheld GPS units load GPX files via cable, manufacturer app, or sometimes an SD card. For the cleanest Garmin path that handles the Course-vs-Activity distinction correctly, see Open GPX in Garmin Connect.

Format comparison

How GPX compares to other formats

GPX is one of several common GPS-data formats. The table below summarizes the differences; the GPX file format reference covers the GPX 1.1 schema in technical detail.

FormatWhat it isPrimary useSupports
GPXXML, open standard (TopoGrafix)Universal route exchangeTracks, routes, waypoints, named extensions
KML 2.3XML, OGC 12-007r2Google Earth and Google My MapsStyled features, overlays, 3D models
KMZZipped KML + assetsCompressed transport with imagesSame as KML plus embedded assets
TCXXML, GarminWorkouts with structured intervalsTracks plus laps, HR zones, planned workouts
FITBinary, GarminHigh-frequency device recordingCompact, sensor-rich, high resolution
GeoJSONJSON, IETF RFC 7946Web maps and geospatial APIsGeneric geographic features, no time semantics
CSVComma-separated textSpreadsheets, statistical analysisJust rows of coordinates
IGCCustom text, FAIParagliding and gliding flight logsTracks plus barometric pressure altitude

GPX is the lingua franca because it predates most competitors, sticks to plain readable XML, and never became proprietary. KML wins when you need Google Earth styling. FIT wins when you need every sensor reading at one-second resolution.

CSV is for when you want to crunch numbers in Excel or pandas; GeoJSON is for when you want to drop a route onto a web map. The right format depends on the destination — if you do not know yet, start with GPX.

For the GPX→KML conversion path used by every Google mapping product, see Open GPX in Google Maps.

Provenance

How GPX files are created

GPX files come from three sources: GPS recording devices, mobile or desktop apps, and route planners that draw new routes from scratch.

GPS devices. A Garmin Edge, Wahoo ELEMNT, Suunto, Coros, or any modern fitness watch records position roughly once per second while moving. When the activity ends, the device saves a track to internal storage. Some units export GPX directly; others use a proprietary format (FIT on Garmin and Wahoo) and convert at upload time.

Mobile and desktop apps. Strava, Komoot, Gaia GPS, AllTrails, Maps.me, and Apple Health all record tracks via the phone's GPS. The app stores activities locally (or on the platform's servers) and offers a GPX export. The export usually appears as a Download GPX button on the activity's web page.

Route planners. Some routes never come from a recording — they are drawn on a map. Komoot, Ride with GPS, BRouter, and Strava's route-builder let you pick a sequence of waypoints, then auto-route the path between them. Save the result as GPX and you have a route to follow rather than a record of where you went.

A fourth, smaller source: conversion. Files originally in KML, KMZ, TCX, or GeoJSON get converted to GPX when a destination platform does not speak the original format. The homepage viewer converts both directions — drop a .gpx, download as KML / KMZ / CSV / GeoJSON; or drop a .kml or .kmz, download as .gpx.

Try it

Open a GPX file in your browser

Drop a .gpx file onto the viewer below and the route renders in a couple of seconds. The file does not leave your browser. If you do not have one handy, the sample GPX files page has a dozen ready-to-use examples covering hiking, cycling, motorcycle touring, and more.

Drop your GPX file here

or browse to choose

Don't have a GPX handy?TryShort hike5 km · AcadiaMarathon42 km · roadCycling50 km · CA

Parsed locally · never uploaded

Workflows

How to open a GPX file

The right way to open a GPX file depends on where you want it to land — viewmygpx in any browser; Gaia GPS, Strava, or Komoot on iOS and Android; Google Earth Pro or Garmin BaseCamp on desktop; Garmin Connect, Strava, AllTrails, or RWGPS for upload to a specific platform.

The full guide covers every destination platform with screenshots and step-by-step instructions: How to open a GPX file.

FAQ

Common questions

What does GPX stand for?

GPX stands for GPS Exchange Format. It is an XML-based file format published by TopoGrafix in October 2002 specifically to let GPS devices and mapping apps exchange routes, tracks, and waypoints without each vendor inventing its own incompatible format. The full specification is hosted at topografix.com/gpx.asp.

When was GPX 1.1 published?

GPX 1.1 was published by TopoGrafix in August 2004 and remains the current authoritative version. The previous release, GPX 1.0, came out in October 2002. The 1.1 schema introduced the <extensions> element so vendor data could live alongside core GPX without breaking validation; the schema has not changed since.

Is there a GPX 2.0?

No. A GPX 2.0 draft circulated around 2010 with proposals for additional metadata and stricter validation, but TopoGrafix never ratified it. Some niche tools declare a GPX 2.x namespace, but no published schema backs it; only versions 1.0 and 1.1 are guaranteed to parse across viewers.

What is the GPX 1.1 namespace?

The default XML namespace for a GPX 1.1 document is http://www.topografix.com/GPX/1/1, declared as the xmlns attribute on the root <gpx> element. GPX 1.0 uses http://www.topografix.com/GPX/1/0. Both namespaces correspond to schema files at the same URL paths under topografix.com.

What coordinate system does GPX use?

GPX coordinates are decimal-degree latitude and longitude on the WGS-84 datum (EPSG:4326), the same datum every consumer GPS receiver uses. Elevations are in meters above the WGS-84 ellipsoid — not above mean sea level. The format does not support alternative datums or projected coordinate systems.

Is GPX universal across GPS devices and apps?

Almost. Every major outdoor app (Strava, Komoot, AllTrails, Gaia GPS, Garmin Connect, Wahoo) reads and writes GPX. Most GPS units do too, though some — like Garmin Edges and Wahoo ELEMNTs — record in FIT (a binary format) internally and emit GPX only on export.

Do I need to install anything to open a GPX file?

No. Modern web-based viewers like viewmygpx open GPX files directly in the browser using the W3C File API and the native DOMParser. The file is parsed client-side in JavaScript memory, so nothing uploads.

What apps record GPX files?

GPS-equipped smartwatches and bike computers (Garmin, Wahoo, Suunto, Coros, Polar, Apple Watch via Strava sync), and most outdoor mobile apps (Strava, Komoot, Gaia GPS, AllTrails, Maps.me, Outdooractive, WorkOutDoors). Each typically lets you export the recording as GPX from the activity's web page or device sync app.

Why doesn't Google Maps open a GPX file directly?

Google Maps prefers KML, the format Google develops in-house and is now standardized as OGC 12-007r2 (KML 2.3). To view a GPX file in Google Maps, convert it to KML first and import the result in Google My Maps. The viewmygpx GPX-and-KML converter handles the round-trip in the browser.

Are GPX files location-private?

A GPX file contains the exact coordinates of every recorded trackpoint, including start and end. If those coordinates trace your home, workplace, or routine routes, sharing the file shares your routine. Apps like Strava have privacy zones that crop GPX exports near sensitive addresses; check before sharing.

What's the difference between a GPX track and a GPX route?

A track (<trk>) is a recorded path with timestamps — what your GPS captured as you moved. A route (<rte>) is a planned path — an ordered list of waypoints meant for turn-by-turn navigation. Some platforms use the words interchangeably, but the format keeps them distinct.

Can I edit a GPX file in the browser?

Yes. The viewmygpx editor trims, merges, reverses, splits, and smooths existing files. It does not draw new routes from scratch — for that, use Komoot or Ride with GPS — but for cleaning up an existing file it covers the common operations.

How big can a GPX file get?

A typical 1-hour fitness recording is 200-500 KB. A multi-day thru-hike might be 5-20 MB. The format itself has no hard size cap, but very large files (over roughly 50 MB) start hitting performance limits in some viewers and are usually a sign that the file should be split or downsampled.

Why does my GPX file have no elevation data?

Some recording sources — particularly older smartphones without barometric sensors, or apps configured to save bandwidth — record only latitude and longitude. The <ele> element is optional in the GPX schema. Elevation can be backfilled from a digital elevation model using tools like Komoot's fix-elevation feature or GPSBabel.

What MIME type does a GPX file have?

GPX files use the application/gpx+xml media type, registered with IANA in September 2013. Some servers serve GPX as application/xml or text/xml, which still works because the file is a valid XML document. The official type is recorded at iana.org/assignments/media-types/application/gpx+xml.

References

Primary sources

Every reference cited on this page, organized by publisher. These are the canonical primary sources — the format's author (TopoGrafix), the standards bodies behind the underlying technology (W3C, IETF, OGC, ISO, IANA, EPSG), and the device vendors that publish their own GPX extensions (Garmin).