GPX Converter

100% private — files never leave your browser

GPX to GeoJSON Converter

Turn .gpx tracks into .geojson files that load directly into Leaflet, Mapbox, QGIS, D3 and every modern mapping stack. Timestamps are preserved in coordinateProperties.times, track segments become separate features, and the whole conversion runs locally in your browser.

How to convert to GeoJSON

  1. 1

    Drop your file

    Drag a FIT, GPX, TCX, KML, KMZ or GeoJSON file onto the box above, or click it to browse. The source format is detected automatically from the file contents.

  2. 2

    Wait a beat

    The conversion runs in a background worker on your device. Typical activities finish in well under a second; even 50 MB files process without freezing the page.

  3. 3

    Check the preview

    Distance, duration, ascent and average heart rate are shown alongside a map of the converted track, so you can confirm nothing was lost before downloading.

  4. 4

    Download

    Click the download button and the .geojson file is saved straight from memory. Nothing was uploaded, so there is nothing to clean up.

What is a GPX file?

GPX (GPS Exchange Format) is the universal, open XML format for GPS data, standardized by TopoGrafix and supported by essentially every mapping application on earth — Strava, Google Earth, Komoot, RideWithGPS, Garmin BaseCamp, QGIS and hundreds of others. A GPX file stores waypoints, routes and tracks as latitude/longitude pairs, optionally with elevation and timestamps, and Garmin's TrackPointExtension carries heart rate, cadence and power alongside each point.

Because GPX is plain text XML, it is readable, diffable, scriptable and trivially editable — which makes it the lingua franca when a track needs to move between ecosystems. The cost is size: the same activity as GPX is typically 5-10× larger than FIT, and consumer-oriented apps sometimes ignore the extension channels. For archiving, editing and cross-platform sharing, though, GPX remains the safest long-term bet.

What is a GeoJSON file?

GeoJSON (RFC 7946) is the JSON dialect of geography — the format the modern web speaks natively. Mapping libraries (Leaflet, Mapbox GL, D3, Deck.gl), data-journalism tools (Datawrapper, Flourish), GIS suites (QGIS, PostGIS) and half the data-science Python stack all consume it without ceremony. A file is a FeatureCollection of geometries, coordinates are written as [longitude, latitude] pairs, and properties ride along as plain JSON.

Like KML, GeoJSON is about geography rather than training. It has no native slots for heart rate or power, though tools freely attach custom properties — the widely used togeojson convention stores per-point timestamps in coordinateProperties.times, which this converter both reads and writes. If the destination is a web map, a dashboard or a data pipeline, GeoJSON is almost always the shortest path.

Why take a GPX route into GeoJSON?

If GPX is the language devices speak, GeoJSON is the language the web speaks. Building an interactive route map with Leaflet or Mapbox GL? The library fetches GeoJSON natively. Plotting this year's tours in Datawrapper? GeoJSON drag-and-drops in. Doing spatial joins or buffer analysis in QGIS or geopandas? Same story. Converting once at the start means every downstream tool works without adapters.

Developers reach for this conversion constantly: a GPX route becomes the geo data for a trip-report site, a club's library of rides becomes a directory of .geojson files served as static assets, a route's geometry gets simplified or measured in a notebook. Because the output is plain JSON, it also lives happily in git — diffs, reviews and history included.

The converter writes one Feature per track segment (multiple segments in the source become multiple features, in order), elevation as the third coordinate, and — when the source has timestamps — ISO times in coordinateProperties.times, the convention Mapbox's togeojson established and web tooling expects.

Conversion details worth knowing

Position, elevation and timestamps map across exactly; nothing is resampled or simplified, so the geometry you analyze is the geometry that was recorded or drawn. The output is pretty-printed with two-space indent — readable in an editor and honest in a diff.

One structural note: GeoJSON features carry a properties object, and this converter writes the track name there, which most web maps display as the feature's label. Heart rate, cadence and power from GPX extensions have no GeoJSON representation and are dropped rather than invented — if the analysis needs them, GPX or TCX is the format to stay in.

Your files never leave this browser

This tool — like every tool on this site — runs entirely as client-side JavaScript. The file you drop is parsed in a Web Worker on your own device, converted in memory and handed straight back to you as a download. There is no upload endpoint, no server-side conversion service and no temporary storage: you can watch the network tab in your browser's developer tools and confirm that no file bytes are transmitted anywhere.

That matters more with fitness data than with most files. A GPS track is a precise log of where you were, at what time, and how hard your heart was working — home address, training habits, favorite routes and race schedule all in one file. Keeping conversion on-device means third-party converters never get a copy of that log, and the tool keeps working identically on a plane, in a basement, or anywhere else without signal.

GPX vs GeoJSON at a glance

AspectGPXGeoJSON
Format typeGPS exchange XMLJSON (RFC 7946)
Typical useMapping apps, navigationWeb maps, GIS, data pipelines
GPS + elevationYesYes (third coordinate)
TimestampsOptional per pointcoordinateProperties.times (ISO)
Segmentstrkseg elementsOne Feature per segment
Best forDevice/app interopEverything built on JSON

Frequently asked questions

Yes. The .geojson file is a static asset — upload it next to your HTML and fetch it from JavaScript. Leaflet's L.geoJSON() and Mapbox's addSource() consume it as-is, no build step required.

Related tools