GPX File Repair: Remove GPS Spikes, Trim Errors
By TrailBlender
Common Causes of Garmin GPS Corruption
Garmin devices are among the most reliable cycling computers on the market, but they're not immune to data corruption. Here are the most common culprits:
- Battery death mid-ride — The device powers off before the file is properly closed, leaving a truncated or malformed GPX/FIT file.
- Firmware bugs — Certain Garmin firmware versions have known issues with file writes, especially after major updates. Check the Garmin forums for your device model.
- Satellite signal loss — Riding through tunnels, dense forests, or urban canyons causes GPS dropout. The file records either no data or wildly inaccurate coordinates during these gaps.
- Interrupted sync — Disconnecting USB or closing Garmin Connect mid-transfer can corrupt the file on either the device or your computer.
- Full storage — When internal memory fills up, the device may stop recording cleanly or overwrite earlier data.
Symptoms of a Corrupted GPX File
You might not realize your file is corrupted until you try to upload it. Watch for these red flags:
- Wrong distance on Strava — Your 80 km ride shows as 120 km because GPS spikes inflated the total.
- Straight lines on the map — The route jumps between distant points instead of following the actual road.
- Missing heart rate or power data — Sensor channels cut off partway through the file even though the device was recording the whole time.
- "Invalid file" errors — Strava, Garmin Connect, or other platforms refuse to process the file at all.
- Sudden zero-speed segments — The file shows you stopped for 20 minutes when you were actually climbing a mountain pass.
How to Diagnose the Problem
Before you can fix a corrupted file, you need to understand what's wrong with it. TrailBlender has no separate diagnostic mode, but the map and charts show most problems at a glance:
- Open the file in TrailBlender — Drag the GPX or FIT file into the app window.
- Check the map preview — Look for obvious anomalies: straight lines, loops to random locations, or missing segments.
- Review the data channels — Examine speed, heart rate, power, and elevation graphs. Sudden spikes or flat-line segments indicate corruption.
- Look at timestamps — Time gaps or duplicate timestamps point to recording interruptions.
Most corruption falls into one of three categories: GPS coordinate spikes (random points far from your route), data gaps (missing chunks of time), or truncated files (recording cut short). TrailBlender can edit spikes and bad ends, but it can only open a file that is still structurally intact (see the limits below).
How to Repair a GPX File with TrailBlender
TrailBlender repairs the data inside a file it can open: it finds GPS spikes and lets you cut out bad sections. It runs on your computer, so the file isn't uploaded anywhere.
- Open the file — Drag the GPX or FIT file into the app.
- Run Spike Detection — Click Detect Spikes and move the sensitivity slider between Conservative and Aggressive. Each detected point is listed with its location and estimated speed.
- Remove the spikes — Untick any point you want to keep, then remove the rest. The points are deleted, not replaced, so no coordinates are invented.
- Trim or crop bad sections — Cut a bad start or end (common after a battery death), crop out a section in the middle, or click individual points on the map or chart to remove them.
- Check the result — Compare the map and charts with what you expect, and validate the repaired file with the free inspector. Edits can be undone.
- Export the clean file — Save as GPX or FIT. The export checks Strava compatibility, such as missing timestamps, and warns you before saving.
What it can't do: TrailBlender doesn't rebuild damaged files or fill GPS gaps. If a GPX is cut off before its closing </gpx> tag, or a FIT file is truncated or fails its checksum, TrailBlender shows an error instead of opening it. Try the original .FIT from your Garmin or a fresh export from Garmin Connect. A zero-byte file has nothing to recover. For gaps and drift specifically, see how to fix GPS drift and tunnel spikes.
If your device died mid-ride and you switched to a phone or second device, you can merge both files instead — TrailBlender combines them into one complete activity.
Prevention Tips
- Keep firmware updated — Garmin regularly patches file-writing bugs. Check for updates monthly.
- Charge fully before rides — Start with 100% battery. Enable battery saver mode for longer rides.
- Enable auto-save — Configure your Garmin to auto-save laps every few minutes. This creates recovery points in the file.
- Use a second device as backup — Record the same ride on your phone or watch. If one file corrupts, you can merge data from the backup.
- Don't interrupt sync — Let Garmin Connect finish syncing before disconnecting. Use wireless sync when possible.
- Clear old activities — Keep your Garmin's storage below 80% capacity to avoid write issues.
Checked 19 October 2026: Strava’s manual upload limit is 25 MB per GPX, TCX or FIT file. Check the exported file size before uploading.
Sources
Frequently Asked Questions
GPX file repair: what can TrailBlender actually fix?
It removes GPS spikes (sudden position jumps), trims or crops bad sections, and lets you delete individual points, then exports a clean GPX or FIT. It does not rebuild structurally damaged files or invent missing data.
GPX repair online: can I fix a GPX file without uploading it?
TrailBlender is a desktop app for macOS, Windows and Linux, not an online service. Your file is processed on your own computer and isn't uploaded, which matters when the track shows where you live.
How do I fix a GPX file that won't open?
TrailBlender reads GPX 1.0 and 1.1 files, including ones with a missing or non-standard namespace, so some files other tools reject will open. A GPX cut off before its closing tag or a damaged FIT file will not open. Try the original .FIT from your Garmin or a fresh export. Zero-byte files have no data to recover.
Why does Strava show a different distance than my Garmin?
Garmin devices calculate distance using both GPS and speed sensor data in real time, while Strava recalculates from GPS coordinates only. If your GPS data has spikes, Strava's recalculation produces a different (usually inflated) distance. Removing the spikes in the file usually closes that gap.
Will fixing the file change my Strava segment times?
It can. Removing GPS spikes that made you appear faster adjusts segment times to your actual speed, and a cleaner track helps Strava match segments. TrailBlender does not fill GPS gaps, so a gap stays a gap.
How do I get the original GPX file off my Garmin?
Connect your Garmin via USB and navigate to the Garmin/Activities folder. Files are stored as .FIT (not .GPX) by default. You can import .FIT files directly into TrailBlender — no conversion needed. Alternatively, export from Garmin Connect as GPX or use the original .FIT file for the best data fidelity.
Related Guides
Merge Strava Activities: Combine GPX Files
Strava can't merge two activities. Export both, merge GPX or FIT files in TrailBlender, upload one ride, delete the duplicates. Free, offline.
scenarioGarmin Died Mid-Ride? Recover and Merge It
Yes, your Garmin saved the ride until it died. Find the .FIT file, recover it via Garmin Connect or USB, and merge it with your second recording.
tutorialFix GPS Drift in GPX and FIT Files: Remove Spikes
Fix GPS drift and position spikes in GPX and FIT files: detect the jumps, remove them, check your distance. Tunnel gaps are not filled.