simplemaplab

GPX Viewer — View & Convert GPX Files Online

Drag any .gpx file from Strava, Garmin Connect, AllTrails, Komoot, Wahoo, or any GPS device onto the map. Tracks, routes, and waypoints render instantly with auto-computed distance, elevation gain, and duration. Convert to GeoJSON or KML in one click. No signup, no upload — all parsing happens in your browser.

The GPX Viewer parses your file with the browser's built-in DOMParser, walks every <wpt>, <rte>, and <trk> (including multi-segment tracks from paused recordings), and renders the result with MapLibre GL JS. Aggregate stats — total distance via haversine, elevation gain/loss, duration if timestamps are present — are computed at parse time and surfaced in the property panel.

Drop a .gpx file anywhere in this box, or use the controls above. Max file size 8 MB. Files are parsed locally — nothing is uploaded.
Or try a sample:
GPX preview
No file loaded
🛰️
Load a GPX file to see every feature listed here.
  • Drag a file into the dashed box
  • Or paste raw text and click Render this text
  • Or click a sample chip above

How to use the GPX Viewer

  1. Drag your .gpx file onto the map. Drop the file anywhere in the dashed input zone, or click "Upload file" to pick it from a folder. The viewer accepts GPX 1.1 (and GPX 1.0 by structural compatibility) up to 8 MB — that covers a full marathon track or a multi-day backpacking trip with thousands of points. The file is read with the browser's FileReader and parsed locally; nothing is uploaded to a server.
  2. See tracks, routes, and waypoints. Recorded tracks become teal lines (with each <trkseg> as its own segment), planned routes also become lines, and waypoints become labelled green dots. The map auto-fits to the bounding box of the loaded data. The sidebar lists every feature with its geometry type — click any to highlight it on the map.
  3. Click for distance, elevation, duration. Selecting a track or route surfaces aggregate stats in the properties panel: total distance (metres, computed by haversine), elevation gain and loss, min/max elevation, plus duration and start/end timestamps if the GPX includes <time> on each point. Waypoint elevation is shown as the single ele_m value.
  4. Convert to KML, GeoJSON, or re-export GPX. The export row offers all three formats. "⬇ KML" produces an OGC KML 2.2 file ready for Google Earth or older GPS units. "⬇ GeoJSON" produces an RFC 7946 FeatureCollection ready for Leaflet, MapLibre, or Mapbox. "⬇ GPX" re-emits a clean GPX 1.1 file — handy if your source GPX has unusual encoding or non-standard extensions you want to strip.

What people use the GPX Viewer for

Preview a Strava export before sharing it

Strava lets you download any of your activities as GPX from the activity menu. Drop the file here to confirm the recorded track is intact (no GPS drift, no missing segments, correct start/end points) before sending it to a friend, posting on a forum, or importing into another platform. The properties panel shows total distance and elevation gain so you can sanity-check the numbers match what Strava displayed.

Convert GPX to KML for Google Earth Pro

Google Earth Pro opens KML natively but does not open GPX directly. Drop your .gpx here, click "⬇ KML," and open the resulting file in Google Earth — track name and description carry over, and elevation is preserved on every point. Works for Garmin Connect exports, Wahoo ELEMNT downloads, COROS apps, and any other GPS-watch export.

Convert GPX to GeoJSON for a Leaflet or Mapbox app

Every modern web mapping library (Leaflet, MapLibre GL, Mapbox GL, OpenLayers, deck.gl) consumes GeoJSON natively but none accept raw GPX. Drop your GPX here, click "⬇ GeoJSON," and you have an RFC 7946 FeatureCollection ready to drop into your map. Track stats (distance, elevation, duration) ride along as feature properties so you do not need to recompute them in JavaScript.

Inspect an AllTrails or Komoot route download

AllTrails Pro and Komoot let you export any saved route as a GPX file. Before hitting the trail, drop the .gpx here to verify the route stays on-trail, has no broken segments, and has the right elevation profile. Useful for catching cases where the exporter clipped a corner or the planned route accidentally crosses private land.

Diagnose a multi-segment track from a paused recording

When you pause and resume a GPS watch mid-activity, the result is a single <trk> with multiple <trkseg> children — one segment per active period. This viewer treats those exactly right: the segments render as a MultiLineString so they each get their own visible line, with the gap visible on the map. Combined distance is reported in the property panel.

Verify a route loaded onto a Garmin Edge or eTrex

Garmin Connect, Strava, RideWithGPS, and Komoot can all push routes to Garmin Edge, Fenix, and eTrex devices as GPX. Drop the GPX you uploaded (or the one the device generates back after a sync) into this viewer to confirm the geometry matches what you planned and the waypoints are correctly labelled.

GPX format reference

A minimal GPX 1.1 file looks like this. The viewer accepts both GPX 1.0 (released 2002) and GPX 1.1 (released 2004) — the schemas are structurally compatible and every modern device emits 1.1.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="My GPS App"
     xmlns="http://www.topografix.com/GPX/1/1">
  <metadata>
    <name>Saturday long run</name>
  </metadata>

  <wpt lat="37.8199" lon="-122.4783">
    <ele>67</ele>
    <name>Golden Gate Bridge</name>
  </wpt>

  <trk>
    <name>Marin Headlands loop</name>
    <trkseg>
      <trkpt lat="37.8270" lon="-122.4810">
        <ele>15</ele>
        <time>2024-09-15T07:00:00Z</time>
      </trkpt>
      <trkpt lat="37.8290" lon="-122.4830">
        <ele>22</ele>
        <time>2024-09-15T07:01:30Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

Note the lat and lon live as XML attributes, not children — this is different from KML, which puts both into a single <coordinates> text node. GPX also conventionally uses latitude first, longitude second (KML reverses this order). The viewer handles both formats correctly; you do not need to flip anything.

Supported elements

Not supported (yet)

GPX vs KML vs GeoJSON — which should you use?

Use GPX when you are exchanging data with a GPS device, GPS watch, or any sport-tracking app — that is what every Garmin, Wahoo, COROS, and Polar device speaks natively, and the format is small, ordered, and time-aware. Use KML when you want to open the data in Google Earth or pass it to an older GIS workflow — KML supports richer styling and descriptions but is much more verbose. Use GeoJSON when you are putting the data into a web map (Leaflet, MapLibre, Mapbox) — every modern JS mapping library consumes GeoJSON natively. The viewer converts between all three in one click, so the choice is just about the destination app.

Related geographic-data tools

For KML files: KML Viewer. For GeoJSON files: GeoJSON Viewer. For dropping a handful of pins by hand: Pin Drop Map. For drawing on the map with a mouse: Map Drawer. For plotting a CSV of coordinates: CSV to Map. For measuring distance between two points: Distance Calculator. For elevation at any point: Elevation Finder.

Frequently asked questions

GPX (the GPS Exchange Format) is an open XML-based file format for GPS data, defined by Topografix as GPX 1.1 in 2004. It contains three kinds of geographic data: <wpt> waypoints (single named points), <rte> routes (an ordered sequence of route points representing a plan), and <trk> tracks (one or more recorded segments of GPS points, usually with timestamps and elevation). Almost every GPS device, watch, smartphone, and mapping app supports GPX import or export.
Drop the .gpx file onto this page. The GPX Viewer parses the XML in your browser using DOMParser, walks every <wpt>, <rte>, and <trk>, and renders the result on a MapLibre/OpenStreetMap base map. No Garmin BaseCamp install, no Strava account, no upload to any server. Works on Mac, Windows, Linux, iPhone, iPad, and Android browsers — anywhere a modern browser runs.
Strava (Account → My Activities → … → Export GPX), Garmin Connect (Activity → Settings cog → Export Original), Wahoo ELEMNT (in-app export), Komoot (route → … → Export), AllTrails Pro (trail → Print/Export → GPX), RideWithGPS, COROS, Polar Flow, Suunto, MapMyRun, Apple Health, Google Earth, Gaia GPS, Avenza Maps, OsmAnd, Locus Map, OruxMaps, and effectively every consumer GPS receiver from Garmin, Magellan, Lowrance, and Bryton.
Yes. Elevation from each point's <ele> tag is preserved as the third value in the GeoJSON coordinate (lng, lat, elevation_metres). Timestamps from <time> tags are aggregated into start_time, end_time, and duration_s properties on tracks and routes. Per-point times are not surfaced in the property table for v1 but the geometry round-trips cleanly through the GeoJSON intermediate format.
GPX optionally carries those via the Garmin TrackPointExtension namespace (<gpxtpx:hr>, <gpxtpx:cad>, <gpxtpx:atemp>) or the proposed Strava extensions. The current viewer ignores those tags — geometry, elevation, and timestamps are the canonical GPX content; HR/cadence/power belong in a FIT or TCX file for serious analysis. If you need pace/HR charts, consider opening the file in Garmin Connect, Strava, or a tool built around FIT files like GoldenCheetah.
Yes — load any GPX and the export row offers three downloads. "⬇ KML" produces OGC KML 2.2 (Google Earth, older GPS units, ArcGIS Pro). "⬇ GeoJSON" produces RFC 7946 (Leaflet, MapLibre, Mapbox, ArcGIS API for JS, every modern web map). "⬇ GPX" re-emits a clean GPX 1.1 file — useful if your source has odd namespaces or non-standard extensions you want to strip. Round-trip GPX → GeoJSON → GPX preserves geometry; track stats are re-emitted as properties.
A track (<trk>) is a record of where you have been — points logged automatically by a GPS watch or phone, usually with timestamps every 1–10 seconds. A route (<rte>) is a plan of where you want to go — a sparser sequence of points usually placed by a person on a map. Tracks are dense and irregular; routes are coarse and intentional. The viewer renders both as line geometries but tags each feature with feature_kind so the GPX round-trip preserves the distinction.
The browser ingest is capped at 8 MB. A typical activity GPX is 50–500 KB (a marathon track is around 200 KB at 1 Hz). The cap mostly matters for multi-day backpacking trips logged at 1 Hz or for aggregated annual exports. For files larger than 8 MB, simplify the geometry by reducing the sampling rate (gpsbabel can decimate by time or distance) before loading.
When you pause and resume the activity recording, Strava splits the track into separate <trkseg> elements — one per active period. Auto-pause (used by most cyclists) does the same. The viewer renders each segment as its own line so the pause gaps are visible on the map. The total distance still sums across all segments.
No upload. The file is read locally with the FileReader API, parsed with the browser's built-in DOMParser, and rendered to MapLibre — all in your browser. The only outbound network calls are for the base-map tiles, which carry only the visible map area, not your data. There is no analytics on file contents and nothing is stored. You can verify this in your browser's DevTools Network tab.
Yes — click "Paste text" to expand the input area, then paste the URL into the "Fetch URL" box and click the button. The remote server must send CORS headers (Access-Control-Allow-Origin: *). GitHub raw URLs, GitHub Gists, S3 public buckets, and most public datasets work. Strava and Garmin Connect activity URLs do not — those require authentication. Download the file via the app's normal export flow and use the upload button instead.
Garmin .FIT and .TCX are richer formats that include detailed sensor data (heart rate per second, cadence, power, lap markers, training-zone analysis). They are also binary or much more elaborate XML. The viewer focuses on GPX — the lightest, most portable format — because that is what almost every cross-platform exchange uses. For .FIT analysis, GoldenCheetah and Connect IQ are purpose-built. For .TCX → GPX, gpsbabel (gpsbabel -i gtrnctr -f in.tcx -o gpx -F out.gpx) converts in one command.
Data sources & methodology

Parser hand-written against Topografix GPX 1.1using the browser'sDOMParser. Distance computed via the haversine formula on the WGS84 spheroid (mean radius 6,371,008.8 m). Elevation gain/loss summed from per-point altitude deltas. Rendering by MapLibre GL JS 5.x with a single GeoJSON source feeding four layers (fill, polygon outline, line, circle). Base map: OpenFreeMap Liberty — vector tiles derived from OpenStreetMap (© OSM contributors, ODbL). No data leaves your browser — files are read via FileReader, parsed locally, and rendered to MapLibre without touching a server. The 8 MB cap is enforced before parsing to keep the page responsive.

More SimpleMapLab tools

KML Viewer

Open a .kml file on the map — view, inspect, convert to GeoJSON or GPX.

GeoJSON Viewer

Drag a .geojson onto the map — view, inspect, convert to KML or GPX.

Elevation Finder

Look up the elevation at any point on Earth — verify GPS altitude readings.

Distance Calculator

Distance between any two locations — straight-line or driving.