How to Merge GPX Files for Strava
The Problem: Strava Can't Merge Activities
You rode with a Garmin head unit recording power data and an Apple Watch tracking your heart rate. Or maybe your GPS battery died mid-ride and you finished recording the last hour on your phone. Either way, you end up with two separate activity files and one frustrating reality: Strava doesn't let you merge them.
Your only option is to pick one file and upload it, losing the data from the other device entirely. That means choosing between your power numbers and your heart rate zones, or between the first half of your ride and the second. Neither choice is great.
The Hard Way: Manual XML Editing
GPX is an XML-based format, so technically you can merge files by hand. Open both in a text editor, locate the <trkpt> elements, and splice them together into a single track. Then fix overlapping timestamps, reconcile different sensor channels, and hope you didn't introduce a typo that corrupts the whole file.
This process takes an hour or more, even for experienced developers. One wrong edit and the file won't parse at all. You'll spend more time debugging XML than you spent on your ride. Not recommended unless you genuinely enjoy pain.
The Easy Way: Use TrailBlender
TrailBlender is a free desktop app built specifically for this problem. It merges GPX and FIT files from any combination of devices — Garmin, Wahoo, Apple Watch, Coros, Suunto, or any other GPS device.
Drag and drop your files, preview the merge on a map, choose which device provides which sensor data, and export one clean file. No upload, no account, works completely offline. Your data never leaves your computer.
Step-by-Step: Merging Your Files
- Download TrailBlender from trailblender.com (free, available for macOS and Windows)
- Open TrailBlender and drag both activity files into the window
- TrailBlender auto-detects time overlaps and shows a preview of the merged track
- Choose your primary GPS source — usually the head unit, which has a better antenna than a watch
- Select which device provides heart rate, power, cadence, and other sensor data
- Review the merged track on the map preview to make sure everything looks correct
- Click Export to save the result as GPX or FIT
- Upload the merged file to Strava — it appears as one complete activity with all your data intact
Tips for Best Results
- Make sure both devices had their clocks synced (GPS usually handles this automatically)
- Use the device with the better GPS antenna as your primary source
- If files have a time gap (not overlap), TrailBlender handles back-to-back segments too
- Preview the merged file before exporting to catch any issues
- Export as FIT if you want to preserve all Garmin-specific data channels
Frequently Asked Questions
Can I merge more than two files at once?
Yes. TrailBlender supports merging multiple files simultaneously. Drag in as many files as you need — three devices from a triathlon, a relay race with multiple handoffs, or any multi-segment recording.
Will Strava detect the merged file as a duplicate?
No. The merged file is a single, clean activity with unique timestamps. Strava treats it as a new upload. Just make sure to delete the individual partial uploads first if you already uploaded them.
Does merging preserve my power and heart rate data?
Yes. TrailBlender preserves all sensor channels — power, heart rate, cadence, temperature, and more. You choose which device provides each channel, so you get the best data from each source.
What if my files overlap in time?
TrailBlender auto-detects overlapping segments and intelligently merges them. It uses the GPS data from your primary source and fills in sensor channels from the secondary device. No manual timestamp editing needed.
Related Guides
How to Fix a Corrupted GPX File from Garmin
Fix corrupted GPX files from Garmin Edge, Forerunner & Fenix devices. Diagnose GPS gaps, spikes, and missing data — then repair with TrailBlender for free.
device-comboHow to Merge Garmin and Apple Watch Ride Data
Combine Garmin Edge power data with Apple Watch heart rate into one activity file. Step-by-step merge guide using TrailBlender — free and offline.