Skip to content

GPX to GeoJSON Converter

Convert GPX (GPS Exchange Format) files to GeoJSON for use in web maps. Perfect for GPS tracks, hiking routes, cycling paths, and waypoints from GPS devices and fitness apps.

What is GPX?

GPX (GPS Exchange Format) is an XML-based format for exchanging GPS data between devices and applications. It's the standard format used by:

  • GPS Devices: Garmin, TomTom, Magellan
  • Fitness Apps: Strava, Komoot, AllTrails, Ride with GPS
  • Mobile Apps: GPS tracking apps, hiking apps
  • Drones: Flight path logs
  • Mapping Software: QGIS, ArcGIS, Google Earth

GPX Data Types

GPX files can contain three types of data:

  • Waypoints (<wpt>): Individual points of interest (POIs) with coordinates, names, descriptions, and elevation
  • Routes (<rte>): Planned paths with ordered waypoints, typically for navigation
  • Tracks (<trk>): Recorded paths with timestamps, showing actual movement over time

How to Convert

  1. Upload your .gpx file (drag-and-drop or browse)
  2. Preview the converted GeoJSON on the map
    • Waypoints appear as Points
    • Routes appear as LineStrings
    • Tracks appear as LineStrings (one per segment)
  3. Download the GeoJSON file

Conversion Details

What Gets Converted

Waypoints → Points

  • Coordinates: Latitude, longitude
  • Elevation: Stored in properties
  • Name & Description: Preserved
  • Time: ISO 8601 timestamp
  • Symbol: Icon/marker type
  • Extensions: Custom GPX data

Routes → LineStrings

  • Route points: Ordered coordinates
  • Route name: Feature property
  • Elevation profile: Per-point elevation data
  • Description: Route metadata

Tracks → LineStrings

  • Track segments: Each segment becomes a LineString
  • Timestamps: Time per coordinate point
  • Elevation profile: Elevation data
  • Track name: Feature property
  • Speed/Heart rate: If present in extensions

Coordinate Format

  • GPX uses: Latitude, Longitude (WGS84)
  • GeoJSON uses: [Longitude, Latitude] (WGS84)
  • Conversion automatically handles the coordinate order swap

Elevation Data

Elevation (altitude) from GPX <ele> tags is preserved in feature properties:

  • Waypoints: properties.elevation
  • Routes/Tracks: Array of elevations matching coordinate points

Common Use Cases

  • Fitness Data: Convert Strava, Garmin, or Fitbit exports to analyze routes
  • Hiking Routes: Share trail maps with non-GPS users
  • Bike Paths: Display cycling routes on web maps
  • Drone Flights: Analyze flight paths and waypoints
  • Geocaching: Convert geocache coordinates for mapping
  • Field Research: GPS survey data to GeoJSON
  • Travel Logs: Visualize trips and journeys

Output Structure

Waypoint Example

json
{
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [-74.0060, 40.7128]
  },
  "properties": {
    "name": "New York City",
    "desc": "The Big Apple",
    "elevation": 10,
    "time": "2025-10-28T10:00:00Z",
    "sym": "city"
  }
}

Track Example

json
{
  "type": "Feature",
  "geometry": {
    "type": "LineString",
    "coordinates": [
      [-110.0000, 45.0000],
      [-110.0010, 45.0010],
      [-110.0020, 45.0020]
    ]
  },
  "properties": {
    "name": "Hiking Trail",
    "desc": "Mountain hiking route",
    "elevations": [1500, 1520, 1550],
    "times": ["2025-10-28T08:00:00Z", "2025-10-28T08:15:00Z", "2025-10-28T08:30:00Z"],
    "coordinateProperties": {
      "times": ["2025-10-28T08:00:00Z", "2025-10-28T08:15:00Z", "2025-10-28T08:30:00Z"]
    }
  }
}

Why Convert to GeoJSON?

  • Web standard: Works with Leaflet, Mapbox, OpenLayers
  • Simpler format: JSON is easier to parse than XML
  • Better performance: Faster parsing and rendering
  • Developer-friendly: Easy to inspect, edit, and manipulate
  • Wider compatibility: More tools support GeoJSON

Tips

Multiple Tracks: GPX files with multiple tracks will generate separate LineString features for each track segment.

Timestamps: Enable analysis of speed, pace, and duration by preserving time data.

Elevation Profiles: Use the elevation arrays to create altitude charts.

Large Files: For very long tracks (10,000+ points), consider simplifying the geometry after conversion.

FAQs

What apps export GPX files? Strava, Garmin Connect, Komoot, AllTrails, Ride with GPS, MapMyRun, Runkeeper, and most GPS devices.

Do I lose elevation data? No—elevation is preserved in the properties.elevations array (for tracks/routes) or properties.elevation (for waypoints).

Can I convert multiple GPX files at once? Yes! Upload multiple files and download them all as a ZIP archive.

Is my GPS data uploaded? No—all conversion happens in your browser. Your files never leave your device.

What coordinate system does GPX use? GPX always uses WGS84 (EPSG:4326), the same as GeoJSON, so no projection conversion is needed.

How do I get GPX files from Strava?

  1. Go to your activity on Strava
  2. Click the wrench icon (or three dots)
  3. Select "Export GPX"

See Also