Why convert GPX to GEOJSON?
Web mapping libraries like Leaflet and Mapbox do not read GPX natively - .geojson is their standard format. Converting lets you display GPS tracks on a web map, run geospatial queries, or feed data into a GIS pipeline without a plugin.
How to convert GPX to GEOJSON
GPSBabel OPEN-SOURCE
Set input to GPX and output to GeoJSON in GPSBabel, select your files and click Apply. Also available for macOS and Linux.
QGIS OPEN-SOURCE
Drag your .gpx into the Layers panel, right-click the layer and choose Export > Save Features As, then set the format to GeoJSON. Also available for macOS and Linux.
About these formats
A GPX file stores GPS data - waypoints, tracks and routes - in plain XML. To view a route, drag it into Google Earth Pro or upload it to GPS Visualizer. To load it onto a Garmin, Wahoo or…
Open .GPX details →A GEOJSON file stores geographic features - points, lines, and polygons with their attributes - as plain JSON text, and it is the standard format for web mapping. To view it on a map…
Open .GEOJSON details →Quality & what to watch
- Tracks become LineString or MultiLineString geometries; waypoints become Point features - all carry over cleanly.
- GPX extension data such as heart rate, cadence or temperature is not part of the GeoJSON spec and is silently dropped by most converters.
- Dense tracks recorded at 1-second intervals produce large GeoJSON files; consider simplifying the track if file size is a concern for web use.