GPX to GeoJSON Converter
Convert GPX to GeoJSON and back in your browser. Your tracks and waypoints stay on your device.
Your GPX and GeoJSON are converted locally in your browser and never uploaded, so your routes, waypoints, and location history stay on your device.
Need to see the coordinates on a map? Try the Coordinate Map Viewer.
About GPX to GeoJSON
This GPX to GeoJSON converter turns a GPS exchange file from your watch, phone, or hiking app into a clean GeoJSON FeatureCollection you can drop into a map, script, or GIS pipeline. Waypoints become Point features, routes and tracks become LineString features, and names, elevations, and timestamps carry over as properties. Flip the direction toggle and it goes the other way, exporting your GeoJSON back to a GPX file that Garmin, Strava, and other GPS tools understand. Paste text directly or load a .gpx or .geojson file from your device. Everything runs entirely in your browser, so your routes, waypoints, and location history are parsed on your device and never uploaded to a server.
Features
- Convert GPX to GeoJSON and GeoJSON to GPX with a single direction toggle
- Turns waypoints (<wpt>) into Point features and routes/tracks (<rte>/<trk>) into LineStrings
- Carries GPX names, descriptions, elevation, and time across as GeoJSON properties
- Load a .gpx, .geojson, .json, or .xml file, or paste the text directly
- Pretty-prints and syntax-highlights the GeoJSON output for easy reading
- Copy the result to your clipboard or download it as .geojson or .gpx
- Clear, specific errors for malformed XML, invalid JSON, or a GPX with no features
- Runs fully in your browser, so location data never leaves your device
How to use the GPX to GeoJSON
- Choose a direction: GPX to GeoJSON (default) or GeoJSON to GPX.
- Paste your GPX or GeoJSON into the input box, or click Choose file to load one.
- Read the converted output in the panel on the right.
- Copy the result, or download it as a .geojson or .gpx file.
Example
Input
<gpx version="1.1" creator="ArrayKit" xmlns="http://www.topografix.com/GPX/1/1">
<wpt lat="48.8584" lon="2.2945">
<name>Eiffel Tower</name>
</wpt>
</gpx>
Output
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": { "name": "Eiffel Tower" },
"geometry": { "type": "Point", "coordinates": [2.2945, 48.8584] }
}
]
}
A GPX waypoint becomes a GeoJSON Point feature, keeping its name.
Common errors & troubleshooting
- The output shows "Invalid XML" when converting GPX to GeoJSON. — Make sure the pasted text is a complete, well-formed GPX document, including the closing </gpx> tag; a truncated copy will not parse.
- You see "No features found" for a valid-looking GPX file. — The GPX needs at least one waypoint (<wpt>), route (<rte>), or track (<trk>). An empty file, or one with only metadata, produces no features.
- Converting GeoJSON to GPX reports "Invalid JSON". — Check for a trailing comma, unquoted key, or missing bracket. Running the text through a JSON formatter first will point to the exact position.
- Some GeoJSON properties are missing from the exported GPX. — GPX only has slots for a fixed set of fields like name, description, elevation, and time. Extra custom properties are folded into the waypoint description or dropped.
Frequently asked questions
- Does the conversion happen on a server?
- No. Both GPX to GeoJSON and GeoJSON to GPX conversions run entirely in your browser using JavaScript. Your file is parsed on your device, so your tracks, waypoints, and location history are never uploaded.
- What GPX elements are supported?
- Waypoints (<wpt>) convert to GeoJSON Point features, while routes (<rte>) and track segments (<trk>/<trkseg>) convert to LineString features. Names, descriptions, elevation (<ele>), and timestamps carry over as feature properties.
- Can I convert GeoJSON back to a GPX file?
- Yes. Switch the direction toggle to GeoJSON to GPX, paste your GeoJSON, and the tool produces a GPX 1.1 file you can download and load into Garmin, Strava, and other GPS apps.
- Can I upload a .gpx or .geojson file instead of pasting?
- Yes. Click Choose file and pick a .gpx, .geojson, .json, or .xml file. It is read locally in your browser and its text is loaded into the input box, ready to convert.
- How large a GPX file can I convert?
- Because everything runs in your browser, the practical limit is your device's memory. Typical activity and route files with thousands of track points convert instantly; very large multi-day logs may take a moment.
- Is the GeoJSON output valid for maps and GIS tools?
- Yes. The output is a standard GeoJSON FeatureCollection with WGS84 [longitude, latitude] coordinates, so it works with Leaflet, Mapbox, QGIS, and anything else that reads GeoJSON.
Related tools
- KML to GeoJSON — Convert KML ⇄ GeoJSON — turn Google Earth KML into GeoJSON for web maps, or GeoJSON back into KML.
- WKT to GeoJSON — Convert WKT (Well-Known Text) to GeoJSON and back, in your browser.
- GeoJSON to CSV — Convert a GeoJSON FeatureCollection to CSV and back — Point features become latitude/longitude columns with their properties.
- Coordinate Map Viewer — Plot a latitude/longitude on an OpenStreetMap map, or click the map to read coordinates back out.
- JSON Formatter — Beautify, minify and validate JSON with error locations.
All ArrayKit tools