Convert GPX to GeoJSON
Turn GPX tracks into GeoJSON for Leaflet, Mapbox, QGIS or your own code. Elevation is kept as a third coordinate, and timestamps are kept too.
Other formats work here too: GPX, KML, KMZ, GeoJSON and TCX.
Converted on your device. Your file is never uploaded.
file ·
How to convert GPX to GeoJSON
- Choose your .gpx file.
- Check the result on the map.
- Download the GeoJSON.
Questions
How is the GPX mapped to GeoJSON?
Each track becomes a Feature with a LineString, or a MultiLineString if it has several segments. Routes become LineStrings with "type": "route" in their properties. Waypoints become Points. Names and descriptions go in the properties.
Where do elevation and timestamps go?
Elevation is the third value of each coordinate, as in [longitude, latitude, elevation]. Timestamps are in properties.coordinateProperties.times, one per point, the convention used by the togeojson library.
Which way round are the coordinates?
GeoJSON is always longitude first, then latitude. GPX stores latitude and longitude as separate attributes, so there's nothing to swap.
Are my files uploaded?
No. The conversion runs in your browser, so your file never leaves your device. Nothing is sent to a server or stored.
Need a Google encoded polyline instead? Try KML → Polyline.