Merge & Combine GPX Files Online

Want to see your entire trip in one map? This GPX merger lets you combine separate GPS tracks and waypoints from multiple rides or hikes into one master file. It keeps your timestamps and elevation data synced, so you can upload a single, complete track to Strava or Garmin Connect.

GPX Merger

Want to test drive the tool?

Before & After

Combine fragmented tracks

Input: Two Morning Rides
xml
<!-- ride_part_1.gpx -->
<trk>
  <name>Morning Ride Pt 1</name>
  <trkseg>
    <trkpt lat="45.523" lon="-122.676"><ele>15.2</ele></trkpt>
    <trkpt lat="45.524" lon="-122.677"><ele>15.5</ele></trkpt>
  </trkseg>
</trk>

<!-- ride_part_2.gpx -->
<trk>
  <name>Morning Ride Pt 2</name>
  <trkseg>
    <trkpt lat="45.525" lon="-122.678"><ele>16.1</ele></trkpt>
  </trkseg>
</trk>
Output: Single Track
xml
<trk>
  <name>Morning Ride (Merged)</name>
  <trkseg>
    <trkpt lat="45.523" lon="-122.676"><ele>15.2</ele></trkpt>
    <trkpt lat="45.524" lon="-122.677"><ele>15.5</ele></trkpt>
    <trkpt lat="45.525" lon="-122.678"><ele>16.1</ele></trkpt>
  </trkseg>
</trk>

How It Works

Clean and simple process

1

Upload GPX

Drag and drop .gpx files or click to browse. Supports all standard GPS devices.

2

Select Tracks

Choose which tracks, routes, or waypoints to include in the final merge.

3

Combine Data

Consolidate points into single continuous tracks or keep them separate.

4

Download File

Get a perfectly formatted GPX file ready for Strava, Garmin, or Google Earth.

GPX Format Comparison

How GPX measures up

Comparison of popular GPS and geographic file formats
FeatureGPXKMLGeoJSONFIT
Primary UseGPS data exchangeMap visualizationWeb mappingFitness devices
Created ByTopoGrafixGoogleIETF / GeoJSON WGGarmin (ANT+)
FormatXMLXMLJSONBinary
Tracks / RoutesYesYes (LineString)Yes (LineString)Yes (Records)
WaypointsYesYes (Placemarks)Yes (Point)No
TimestampsPer track pointVia TimeStampNot built-inPer record
Fitness Data (HR, cadence)Via extensionsNoNoNative support
Human-ReadableYesYesYesNo (binary)
File SizeMediumMedium-LargeSmall-MediumVery small
Best ForHiking, cycling, GPS sharingGoogle Earth, visual mapsWeb apps, APIsGarmin watches, bike computers

Use Cases

GPS track consolidation

Multi-Day Hiking

Combine daily GPS logs from thru-hikes or backpacking trips into a single continuous track showing your entire journey on one map.

Broken Recording Fix

Stitch together tracks from a paused or restarted recording. Fix battery deaths mid-ride by merging the two halves back into one activity.

Waypoint Collection

Compile waypoints from multiple scouting sessions into a master POI file. Perfect for fishing spots, campsites, or geocache locations.

Race Route Planning

Merge separate route segments into a complete race course. Combine reconnaissance rides into one file for event organizers and participants.

Key Features

Built for performance

Smart Consolidator

Stitch broken tracks together into a single continuous activity.

Selective Merging

Extract and merge just waypoints, tracks, or segments.

Data Preservation

Elevation, timestamps, and fitness data are perfectly preserved.

FAQ

Common questions

Programmatic Merge

Python and CLI

Pythonmerge_gpx.py
import gpxpy
import glob

merged = gpxpy.gpx.GPX()

for filepath in sorted(glob.glob("day_*.gpx")):
    with open(filepath, "r") as f:
        gpx = gpxpy.parse(f)
        for track in gpx.tracks:
            merged.tracks.append(track)
        for waypoint in gpx.waypoints:
            merged.waypoints.append(waypoint)
        for route in gpx.routes:
            merged.routes.append(route)

with open("merged_trip.gpx", "w") as f:
    f.write(merged.to_xml())

print(f"Merged {len(merged.tracks)} tracks, "
      f"{len(merged.waypoints)} waypoints, "
      f"{len(merged.routes)} routes")
Bashmerge.sh
# Merge multiple GPX files using gpsbabel (CLI)
# Install: sudo apt install gpsbabel  (Linux)
#          brew install gpsbabel       (macOS)

# Merge two GPX files, keeping all tracks and waypoints
gpsbabel -i gpx -f day1.gpx -i gpx -f day2.gpx -o gpx -F merged.gpx

# Merge an entire folder of GPX files
gpsbabel \
  -i gpx -f morning_ride.gpx \
  -i gpx -f afternoon_ride.gpx \
  -i gpx -f evening_walk.gpx \
  -o gpx -F full_day.gpx

Complete Guide

In-depth walkthrough

What this tool is for

You recorded a route in two parts because your GPS died, your phone ran out of battery, or you split a long ride into segments. Now you want one complete file that shows the entire route from start to finish.

Drop both GPX files into the tool, click merge, and download the combined version. Then upload it to Strava, Garmin Connect, Komoot, or wherever you track your activities. The merged file will show as one complete route with all your distance, elevation, and time data intact.

This is useful for multi-day hikes where you record each day separately, bike tours split across multiple rides, or any time your device dies mid-activity and you have to restart recording on a different device.

No technical knowledge needed. Everything happens in your browser, so your GPS data never gets uploaded to any server.

How to export your GPX file

From Strava: Open the activity you want to export, click the three-dot menu in the top right, select Export GPX, and the file downloads to your computer. You can only export your own activities, not other people's routes.

From Garmin Connect: Open the activity, click the gear icon in the top right, select Export to GPX, and the file downloads. If you recorded the activity on a Garmin watch or bike computer, this is the easiest way to get the GPX file.

From Komoot: Open the tour you want to export, click the three-dot menu, select Download, and choose GPX format. This works for both planned routes and completed tours.

From a Garmin device directly: Connect your Garmin watch or bike computer to your computer with a USB cable, open the device folder, go to the Garmin folder, then the Activities folder. Copy the .fit or .gpx files to your computer. If they're .fit files, export them from Garmin Connect first to convert to GPX.

After merging - where to upload it

To upload the merged file to Strava, go to the upload page, drag the GPX file in, and it will appear as one continuous activity. Same process for Garmin Connect and Komoot-just use their upload or import buttons.

The merged file will show as one complete route with the total distance, elevation gain, and time from both original files combined. Your stats will be accurate because the tool preserves all the timestamp and elevation data from each file.

If you recorded the two parts on the same day, the merged activity will show the correct total time including any break between the two recordings.

Common reasons the merge might not work

Files from different devices may use different GPX versions (1.0 or 1.1), but the tool handles both automatically. You don't need to worry about which version your device uses.

If you have .fit files from a Garmin device, you need to convert them to GPX first. The easiest way is to upload the .fit file to Garmin Connect, then export it as GPX from there. The tool only works with GPX files, not .fit files.

If your two tracks have a time gap between them (like you stopped for lunch and restarted recording an hour later), the merged file will show that gap. Strava and other apps will calculate your moving time correctly and exclude the break from your average pace or speed.