GPX ↔ GeoJSON Converter

Convert GPS exchange format (GPX) to/from GeoJSON

Import & Export

Drop file here or click to browse

.gpx, .geojson

Try: |

Options

GPX to GeoJSON Converter

This is a free, browser-based GPX to GeoJSON converter (and back again) that lets you convert GPX files from any GPS device, fitness tracker, or hiking app into GeoJSON for use in modern web maps. Drop your .gpx file in, see your tracks, routes, and waypoints rendered on a live map, and download the resulting GeoJSON. Going the other way, paste a GeoJSON file in and export it to GPX so you can load it onto a Garmin, an iPhone hiking app, or any other GPS-aware device. Everything happens in your browser, so your activity history never leaves your computer.

GPX (GPS Exchange Format) is the universal interchange format for GPS data. Garmin watches, Suunto computers, Strava, Komoot, AllTrails, Wahoo, Polar, Gaia GPS, and dozens of other apps export to GPX. It's an XML format with three main element types: waypoints (named points of interest), routes (ordered sequences of points to navigate to), and tracks (the actual recorded path with timestamps and elevations). GeoJSON, by contrast, is the dominant format for web mapping and visualisation. The bridge between them is one of the most common conversions runners, hikers, cyclists, and outdoor researchers need.

How GPX-to-GeoJSON Conversion Works

The converter parses the GPX XML and walks the tree, extracting <wpt>, <rte>, and <trk> elements. Waypoints become GeoJSON Point features. Routes become LineString features (one per route). Tracks are slightly more complex: a single track can contain multiple <trkseg> segments (for example, when GPS signal was lost and reacquired), so the converter emits a MultiLineString to preserve that structure, or splits it into separate LineStrings depending on user preference.

Elevation, time, and per-point extensions (heart rate, cadence, power) are preserved as additional coordinates or as a coordinateProperties extension on the resulting feature, since GeoJSON itself doesn't have first-class support for time-stamped tracks.

Reverse Direction

Going from GeoJSON back to GPX, every Point becomes a <wpt>, every LineString becomes a track with one segment, and properties are written into the GPX <extensions> namespace.

Practical Applications

Strava and Fitness Data Analysis

A cyclist exporting their entire Strava activity history wants to plot heatmaps of their rides in a custom dashboard. Strava exports as GPX. Converting to GeoJSON lets them load the data into Mapbox GL, kepler.gl, or a Jupyter notebook for analysis.

Hiking Trail Publishing

Trail clubs and tourism boards record routes on a GPS, want to publish them on their website, and need GeoJSON. Converting batches of GPX from Garmin devices unlocks every modern map-publishing workflow.

Field Science

Researchers walking transects, marking sample sites, or recording wildlife sightings on handheld GPS units export GPX and need it in GeoJSON to merge with other layers in their analysis pipeline.

Adventure Racing and Orienteering

Event organisers receive participant tracks as GPX after a race. Converting to GeoJSON lets them aggregate, compare, and visualise routes on a unified web map.

Drone Flight Logs

Many consumer drones export GPS flight paths as GPX. Pilots converting to GeoJSON can analyse their flights, generate flight reports, and overlay them on terrain.

Maritime and Sailing

Cruisers and racing sailors record passages on their chart plotters and export as GPX. Converting to GeoJSON lets them annotate the passages and embed them in a sailing blog.

Public Safety and Search & Rescue

Search teams record their search patterns on handheld GPS during operations. Converting GPX to GeoJSON enables aggregation across teams and quick visualisation in command centres.

Step-by-Step Workflow in gis.tools

  1. Open the GPX ↔ GeoJSON Converter page.
  2. Drag your .gpx file into the drop zone, or paste GPX XML directly into the text area.
  3. The parser reads the file and renders waypoints, routes, and tracks on the preview map.
  4. Inspect the feature list — typically one or more tracks plus any waypoints — and verify everything looks right.
  5. Click Download GeoJSON.
  6. To go the other way, switch to GeoJSON input mode and paste or drop GeoJSON; download the resulting .gpx.

Worked Example

An ultra-runner has a GPX file from their Garmin watch covering a 100 km race. The file is 1.4 MB and contains 14,300 trackpoints with elevation, heart rate, and timestamps. They drop it in, the converter renders the entire route on a map with elevation profile, and they download the GeoJSON. The result is a single MultiLineString feature with coordinateProperties for time, elevation, and heart rate.

They want to publish a clean version on their blog without the heart rate data, so they trim the extensions and run the GeoJSON through the GeoJSON Simplifier to drop from 14,300 vertices to 1,200 — small enough to embed in a Markdown post without slowing the page down.

Common Pitfalls and Gotchas

  • Multi-segment tracks — A single <trk> with multiple <trkseg> elements can be flattened to one LineString or preserved as a MultiLineString. The wrong choice changes how downstream tools count features.
  • Antimeridian crossing — Tracks that cross 180° longitude (mostly nautical voyages) need to be split for GeoJSON compliance.
  • GPS noise — Raw GPS tracks contain spikes and outliers from poor signal. Run a smoothing or simplification pass before publishing.
  • Time information loss — GPX preserves per-point timestamps; GeoJSON does not natively. Use coordinateProperties or custom properties to keep them.
  • Elevation in feet vs metres — GPX always stores elevation in metres. Some apps mislabel this in their UI but the file is still metric.
  • Routes vs tracks — A <rte> is a planned route; a <trk> is the recorded path. They render the same way on a map but mean different things.
  • Encoding issues — GPX is XML and should be UTF-8; older devices sometimes use Latin-1.

Tips for Best Results

  • Smooth or simplify long tracks before publishing to keep file size manageable.
  • Strip personal data (heart rate, exact times) before sharing routes publicly.
  • Use the GeoJSON Validator & Fixer to catch antimeridian and ring winding issues.
  • For multi-track GPX files, decide upfront whether to merge them into a MultiLineString or keep them separate.
  • The Coordinate Precision Reducer is invaluable for shrinking GPS-derived GeoJSON.
  • Convert before editing — GeoJSON is much friendlier to programmatic transformations than GPX.

Comparison with Other GIS Approaches

Mapbox's togeojson JavaScript library is the de facto standard parser; this tool uses the same conventions. QGIS imports GPX via Add Vector Layer but the round trip back to GPX can lose extension data. Strava and Garmin Connect can export GPX but neither exports GeoJSON. Online services like MyGeodata and AnyConv work but route your data through their servers, which is a privacy concern for activity data that pinpoints your home address. The browser-based gis.tools converter is the fastest, most private option for casual conversion.

Performance Considerations

GPX is XML and verbose. A typical recorded ride or hike is a few hundred kilobytes; an ultra-marathon track might be 1–5 MB. The browser handles up to about 50 MB comfortably, which is enough for years of cycling data. For larger archives, batch-convert with a desktop tool.

Data Privacy and Browser-Based Processing

GPX files often start at your home address. They reveal your daily commute, your gym, your favourite trails, your family routine. That's exactly the kind of data you should not upload to a third-party service. Everything in the gis.tools converter runs locally in your browser tab — no uploads, no telemetry, no server logs.

Related GIS Concepts

Trackpoint Extensions — Garmin's gpxtpx namespace adds heart rate, cadence, temperature, and power to trackpoints. The converter preserves them as properties.

Track Smoothing — Algorithms like Kalman filtering or moving average that remove GPS noise. Not part of the converter, but a common follow-up.

Strava Heatmap — Strava aggregates millions of GPX uploads into a global heatmap; converting your own GPX to GeoJSON lets you build a personal version.

Frequently Asked Questions

Will my heart rate data carry over?

Yes, as coordinateProperties or per-point properties in the GeoJSON output.

Can I convert multiple GPX files at once?

This tool processes one file at a time. For batch jobs, use ogr2ogr or a script.

What about FIT files from Garmin?

FIT is a different binary format. Convert it to GPX first using Garmin Connect or a desktop tool.

How big can my GPX file be?

Up to about 50 MB on a desktop browser; mobile browsers are lower.

Related Tools on gis.tools

100% client-side processing - your data stays private and never leaves your device