GPX to GeoJSON Converter
Convert a GPX file into a GeoJSON FeatureCollection with waypoints as Points, tracks and routes as LineStrings, keeping names, times and elevation.
Output options
Drop a GPX file to convert its waypoints, routes and tracks into a GeoJSON FeatureCollection.
What is the GPX to GeoJSON Converter?
This converter turns GPX into a GeoJSON FeatureCollection that any modern mapping stack will accept.
- Waypoints become Point features; routes and tracks become LineStrings
- Multi-segment tracks become a MultiLineString so segment gaps are not bridged
- Names, descriptions, point counts and start/end times carried into properties
- Optional elevation as a third coordinate, per RFC 7946
- Coordinate rounding from full precision down to four decimals to shrink the file
- Runs offline in your browser — nothing is uploaded
How to use the GPX to GeoJSON Converter
- 1
Drop a .gpx file onto the box, or paste the GPX text into the text area.
- 2
Tick which parts to convert: waypoints, routes, tracks, or all three.
- 3
Choose a coordinate precision and decide whether to keep elevation as a third coordinate.
- 4
Copy the GeoJSON or download the .geojson file ready for Leaflet, QGIS or Mapbox.
About the GPX to GeoJSON Converter
This converter turns GPX into a GeoJSON FeatureCollection that any modern mapping stack will accept. Each waypoint becomes a Point feature, each route becomes a LineString and each track becomes a LineString — or a MultiLineString when it has several segments, so the gaps between segments are not drawn as false straight lines.
Names, descriptions, elevation and start/end timestamps are carried into the feature properties, and elevation can optionally stay as a third coordinate value. A precision setting lets you round coordinates, which typically halves the file size with no visible change on a map.
GeoJSON is what Leaflet, Mapbox GL, OpenLayers, QGIS, GitHub previews and PostGIS all speak natively, so this is usually the first step in getting a recorded track into a real application. Conversion happens locally in your browser and the file is never uploaded.
Frequently asked questions
What is the difference between GPX and GeoJSON?
GPX is an XML format built specifically for GPS devices, with waypoints, routes and tracks. GeoJSON is a general JSON format for any geographic feature and is what web maps and JavaScript libraries read directly. Converting lets you use a recorded track in code without an XML parser.
Why are coordinates written longitude first?
RFC 7946 requires positions to be [longitude, latitude], the opposite order from how people say a coordinate aloud. It trips up almost everyone at least once. This tool always writes the correct order, so if your points land in the ocean off Africa the problem is elsewhere.
Does the conversion keep elevation and timestamps?
Elevation is kept as an optional third coordinate value and also in the properties of waypoints. Per-point timestamps are not part of a GeoJSON LineString, so the track's start and end times are stored in the feature properties instead — use the CSV converter if you need a time for every point.
Why does my track become a MultiLineString?
Because it has more than one segment. A GPX track splits into segments whenever recording pauses. Joining them into a single LineString would draw a straight line across the gap, so separate segments are kept separate as a MultiLineString.
How much smaller does rounding make the file?
Usually about half. Six decimal places locates a point to roughly 10 cm, which is well beyond consumer GPS accuracy, yet raw exports often carry 12 or more digits. Dropping to six decimals costs nothing visible and cuts a lot of bytes.
Related tools
GPX to CSV Converter
Convert GPX waypoints, routes and track points into a CSV with latitude, longitude, elevation, time, and optional distance and speed columns.
GPX to KML Converter
Convert GPX files from your GPS device to KML for Google Earth. Waypoints, tracks and routes preserved with names and elevation — free and private.
GPX Track Analyzer
Analyse a GPX file for distance, elevation gain and loss, moving versus elapsed time, speed and pace, with an elevation profile drawn in your browser.
GeoJSON Simplifier
Shrink GeoJSON with the Ramer-Douglas-Peucker algorithm at a tolerance in metres, and see the before-and-after outline and the file size saving.
KML to GeoJSON Converter
Convert KML files to GeoJSON FeatureCollections in your browser. Placemarks, folders, polygons with holes and MultiGeometry supported. Free, no upload.