GPX to GeoJSON Converter

Paste GPX content or drop a .gpx file to instantly convert GPS tracks, routes, and waypoints from Strava, Garmin, Komoot, or any GPS device into standard GeoJSON. Runs entirely client-side using the toGeoJSON library, so your route data never leaves your device.

PrivateFreeWorks offline

Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026

How it works

  1. 1

    Paste your GPX markup or drop a .gpx file into the input box.

  2. 2

    The tool parses the XML with a browser DOMParser and converts it with toGeoJSON.

  3. 3

    The resulting GeoJSON FeatureCollection appears instantly, along with a count of tracks, routes, and waypoints found.

  4. 4

    Copy it to your clipboard or download it as a .geojson file.

Why convert GPX to GeoJSON?

GPX is the de-facto format for GPS tracks, routes, and waypoints produced by fitness apps, GPS watches, and navigation devices. GeoJSON, on the other hand, is what modern web maps (Leaflet, Mapbox GL, OpenLayers) and spatial analysis tools like Turf.js expect. Converting a recorded ride, hike, or run into GeoJSON is usually the first step to visualizing it on a custom map or running distance and elevation analysis.

Faithful, standards-based conversion

This tool uses a real XML DOM parser together with toGeoJSON, the same conversion library used across Mapbox's own tooling, so tracks, routes, segments, and waypoints are mapped the way the wider GIS ecosystem expects, including the `_gpxType` marker used to tell tracks and routes apart after conversion.

Your routes stay private

GPS tracks can reveal home addresses, daily routines, or private trails, data you may not want to hand to a third-party server. Because the conversion runs as JavaScript in your browser tab, your GPX file and the resulting GeoJSON never leave your device.

Frequently asked questions

Does this upload my GPX file to a server?

No. The GPX is parsed and converted in your browser using the DOMParser API and the toGeoJSON library, so nothing is sent anywhere.

What GPX elements are supported?

Tracks (<trk>), routes (<rte>), and waypoints (<wpt>) are all converted to their GeoJSON equivalents (LineString and Point features), with a `_gpxType` property marking whether a line came from a track or a route.

Can I convert GPX files exported from Strava, Garmin Connect, or Komoot?

Yes. Any file following the standard GPX 1.0 or 1.1 schema, which covers virtually all fitness apps, GPS watches, and route planners, converts correctly.

Does it keep elevation and timestamp data?

toGeoJSON preserves elevation as the third coordinate value when present, and includes timestamps in the feature's coordinateProperties where applicable.

Is there a size limit for GPX files?

There's no artificial limit. Very long recorded rides or hikes with thousands of trackpoints will work, though extremely large files depend on your browser's available memory.

Related tools