GPX Viewer
Open a .gpx file on a map, read its distance, elevation and bounding box, and export GeoJSON — all in your browser.
Your GPX file is parsed and analysed entirely in your browser; the route, stats and exported GeoJSON stay on your device. Only OpenStreetMap map tiles are loaded over the network to render the map.
Need the raw GeoJSON both ways? Try the GPX ↔ GeoJSON converter.
About GPX Viewer
This GPX viewer opens a route recorded by your watch, bike computer or phone and draws it on an OpenStreetMap map without leaving your browser. Drag in a .gpx file, choose one, or paste the GPX XML, and the tool plots every track and route as a line and drops a pin for each waypoint, then fits the map to the whole activity. Alongside the map it reports how many tracks, routes and waypoints the file holds, the total track distance in kilometres and miles from a haversine sum, the bounding box, and — when the points carry elevation — the total climb, descent and min/max height. You can export the parsed data as GeoJSON for another map or GIS tool, or copy the stats. The GPX is parsed on your device; only the map tiles load over the network.
Features
- Drag-drop a .gpx file, choose one, or paste GPX XML to preview it instantly
- Draws tracks and routes as lines and waypoints as pins on an OpenStreetMap map
- Auto-fits the map to the full activity so the whole route is in view
- Counts tracks, routes and waypoints in the file at a glance
- Total track distance in kilometres and miles from a haversine sum
- Elevation gain, loss and min/max when the track points carry heights
- Reports the bounding box (south, north, west, east) of every point
- Export the parsed GeoJSON or copy the stats with one click
How to use the GPX Viewer
- Drop a .gpx file onto the box, click Choose file, or paste GPX XML.
- See the tracks, routes and waypoints drawn on the map, auto-fitted to bounds.
- Read the distance, elevation and bounding-box stats beside the map.
- Copy the stats, or Download GeoJSON to reuse the parsed data elsewhere.
Example
Input
<gpx version="1.1" xmlns="http://www.topografix.com/GPX/1/1">
<trk><trkseg>
<trkpt lat="46.5540" lon="7.9910"><ele>1980</ele></trkpt>
<trkpt lat="46.5625" lon="8.0060"><ele>2310</ele></trkpt>
<trkpt lat="46.5705" lon="8.0210"><ele>2460</ele></trkpt>
</trkseg></trk>
</gpx>
Output
1 track · 0 routes · 0 waypoints
Distance: 2.15 km (1.34 mi)
Elevation gain: 480 m · loss: 0 m · min/max: 1980 / 2460 m
A short alpine track: the viewer sums its distance and elevation and plots the line.
Common errors & troubleshooting
- The map stays empty and you see a "No geometry found" message. — The file must contain at least one waypoint (<wpt>), route (<rte>) or track (<trk>). A GPX with only metadata has nothing to draw.
- Elevation gain shows nothing even though the route climbs. — Elevation stats need a third value on the points — an <ele> tag inside each <trkpt>. Files recorded without a barometric or GPS altitude have no heights to total.
- Loading the file reports an "Invalid XML" error. — The GPX is not well-formed XML — often a truncated download or a mangled tag. Re-export it, or open it in a text editor to find the unclosed element.
Frequently asked questions
- How do I open a GPX file in the browser?
- Drag the .gpx file onto the drop box, click Choose file to pick it, or paste the GPX XML directly. The viewer parses it on your device and draws the tracks, routes and waypoints on the map, then fits the view to the whole activity.
- How is the GPX track distance calculated?
- The viewer walks each track and route point by point and adds up the great-circle (haversine) distance between consecutive points, then shows the total in both kilometres and miles. Standalone waypoints do not add to the distance.
- Why is the elevation gain different from what my watch reported?
- This viewer sums every positive step between recorded <ele> values, so noisy GPS or barometric altitude can inflate the total. Devices smooth or threshold the signal before reporting gain, which usually yields a lower, steadier number.
- What does the bounding box tell me?
- The bounding box is the smallest south/north/west/east rectangle that contains every point in the file. It is handy for checking roughly where an activity took place or for setting the extent of another map.
- Can I turn the GPX into GeoJSON to use elsewhere?
- Yes. The viewer already parses the GPX into a GeoJSON FeatureCollection to draw it, and Download GeoJSON saves that data as a .geojson file you can load into a GIS tool, a web map, or another ArrayKit converter.
- Does viewing a GPX file upload my route anywhere?
- No. The GPX is read and parsed in your browser and the stats are computed on your device. Only the OpenStreetMap background tiles are fetched over the network to draw the map; the route itself is never uploaded.
Related tools
- GPX to GeoJSON — Convert GPX to GeoJSON and back — GPS tracks, routes and waypoints to GeoJSON features, or GeoJSON back to a GPX file.
- GeoJSON Viewer & Validator — Paste or drop GeoJSON to validate it and see its features on a map, with feature counts and a bounding box.
- Coordinate Map Viewer — Plot a latitude/longitude on an OpenStreetMap map, or click the map to read coordinates back out.
- Distance Between Coordinates — Measure the great-circle distance between two latitude/longitude points in km, miles and nautical miles, with bearing and a map.
- KML to GeoJSON — Convert KML ⇄ GeoJSON — turn Google Earth KML into GeoJSON for web maps, or GeoJSON back into KML.
- GeoJSON to CSV — Convert a GeoJSON FeatureCollection to CSV and back — Point features become latitude/longitude columns with their properties.
All ArrayKit tools