Shard Tools

GPX to GeoJSON

Convert a GPX GPS track or waypoints to GeoJSON in your browser, ready for mapping tools.

Maintained by Roshan.

Use GPX to GeoJSON

Converts gpx to geojson in this tab, with nothing sent anywhere.

Runs entirely on your deviceThe conversion happens in this browser tab. Nothing you type is uploaded, logged or stored, which is worth knowing for anything you would not paste into a search box.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About GPX to GeoJSON

GPX is the format GPS devices and fitness apps use to record where you went - a run, a ride, a hike, a survey - but the wider world of web mapping runs on GeoJSON. Converting a GPX file to GeoJSON is what lets you take a recorded track and display it on a web map, style it, or process it with the many tools built around GeoJSON. This reads the points out of a GPX file - track points, route points and standalone waypoints - and produces the matching GeoJSON: a connected line for a recorded track, individual points for loose waypoints. A GPS trace is revealing data, the literal record of your movements, so converting it in the browser rather than uploading it to a website is the obvious right choice.

Work through the input

  1. The GPX is scanned for its point elements - track points, route points and waypoints - reading the latitude and longitude from each.
  2. A file containing a track or route is treated as a path, its points joined into a single connected LineString.
  3. A file of standalone waypoints becomes individual point features instead.
  4. Coordinates are written in GeoJSON's longitude-then-latitude order.
  5. The result is a standard FeatureCollection ready for a mapping library.

When gpx to geojson is useful

Putting a run on a web map

Export the activity as GPX, convert here, and load the GeoJSON into a mapping library to draw the route.

Processing a survey track

GeoJSON is what geographic tools consume. This turns a device's GPX into it without uploading your movements.

Check the output

Questions about GPX to GeoJSON

Does it keep elevation and timestamps?

No. It extracts the route's shape - the points and their order. Elevation, time and sensor data are not carried over.

What does a track become?

A single connected LineString. Loose waypoints become individual point features instead.

What coordinate order does it use?

Longitude then latitude, as GeoJSON requires.

Can it handle waypoints and tracks together?

It classifies by a heuristic. A file mixing them may not split exactly as expected.

Related tools

GeoJSON to CSV

Convert GeoJSON point features to CSV in your browser, with longitude, latitude and properties as columns.

CSV to GeoJSON

Convert a CSV with latitude and longitude columns to GeoJSON in your browser, ready for mapping tools.

JSON Formatter and Validator

Format, minify, and validate JSON locally in your browser. Inspect keys, values, nesting depth, and root type without sending private API data to a server.