Convert GPX to GeoJSON to move GPS recordings into Leaflet, Mapbox, D3 or any modern web stack. The parsing is done by your own browser, no upload involved, which also makes it quick for big track logs.
Drop a file here, or click to browse
KML, KMZ, SHP (.zip), GeoJSON, GPKG, GML, GPX, DXF, CSV, Excel, and more
No GPX file to hand? Download a sample GPX file (100 points) and drop it above to see the conversion.
Every format stores different things, so a conversion is never perfectly loss-free. Here is exactly what carries over when you convert GPX to GeoJSON, and what to watch for.
| What | GPX → GeoJSON | |
|---|---|---|
| Geometry | Kept | Points, lines and polygons are preserved exactly, including multi-part shapes. |
| Attributes | Kept | Every column and full field name moves from GPX into GeoJSON untouched. |
| Styling & labels | Kept | Neither GPX nor GeoJSON stores visual styling, so there is nothing to lose, the geometry and data carry straight over. |
| Coordinate system | Changes | GeoJSON is defined in WGS84 (EPSG:4326), so data is reprojected to lon/lat on the way out. |
| Elevation (Z) | Kept | 3D Z values carry from GPX into GeoJSON wherever the source records them. |
| File structure | Kept | A single, self-contained .geojson file you can move around on its own. |
GPX is the language of GPS devices and fitness apps. Your watch or handheld records a hike as waypoints, routes and tracks, then exports GPX. However, that XML does not drop cleanly into a web map. So people convert GPX to GeoJSON, the format the modern web-mapping stack speaks. Once the track is GeoJSON, you can render it directly in Leaflet, Mapbox GL or OpenLayers. For example, a Strava or Komoot ride becomes a line on your own site. GeoJSON is also plain text, so you can pass it through web APIs or version-control the route in Git.
GPX is already defined in WGS84 longitude/latitude (EPSG:4326), so no guessing is needed on the way in.
GeoJSON is defined in WGS84 (EPSG:4326), so the output is reprojected to longitude/latitude, exactly what Google Earth and web maps expect. A quick CRS check before you download saves the classic "my GPX data is in the wrong place" surprise; the guide on coordinate systems and EPSG codes goes deeper.
GPX carries limited attributes, so do not expect a rich table after conversion. A track holds coordinates, elevation and timestamps, little else. Also, GPX stores three geometry kinds: waypoints as points, routes and tracks as lines. Check which ones landed in your GeoJSON features. Both formats use WGS84 lon/lat, so coordinates line up. Then confirm your track became a LineString, not scattered points.
GPX files typically come out of Garmin, Strava, Komoot, QGIS, GPSBabel. Once you convert to GeoJSON, the file opens in web maps built on Leaflet, Mapbox GL or OpenLayers, and desktop tools like QGIS. The GeoJSON output follows the standard specification exactly, so those programs read it without any special import settings.
A GPX file is what your watch or handheld records after a hike or ride: waypoints, an ordered route, and dense tracks of timestamped points. GeoJSON is what a web map wants to draw. This conversion turns that recorded outdoor data into features a Leaflet or Mapbox GL layer can render directly. In practice you export a track from Strava or Komoot, then reshape it here so JavaScript can read every point and property.
Yes. A GPX track or route converts to a LineString feature, while waypoints become individual Point features. So a recorded ride stays a continuous line, not loose dots.
Yes. GeoJSON is the native vector format for Leaflet, Mapbox GL and OpenLayers, so you can pass the output directly to an L.geoJSON or map source with no extra conversion.
Track segments and routes become LineString features, while waypoints become Point features. A track split into several segments can produce a MultiLineString. That means a single ride usually lands as one line you can style in Leaflet.
GPX stores elevation and time on each track point, but a LineString keeps only the coordinates. Elevation can be carried as a third coordinate value, yet per-point timestamps usually do not survive as standard GeoJSON properties. Keep the original GPX if you need the full time series.
A GeoJSON file opens in web maps (Leaflet, Mapbox, OpenLayers) and QGIS. Because the output follows the standard specification, any tool that supports GeoJSON will read it without special settings.
No conversion is perfectly loss-free because each format stores different things, but geometry and attributes are preserved; only presentation-level styling (which GeoJSON does not store) is left behind.