Trim a GPX File
Upload a GPX or TCX file, preview it on a map with an elevation profile, then drag the start/end markers to cut off the parts you don't want. Export a clean file when you're done.
Your file never leaves your device.
Parsing, trimming, merging, and exporting all happen locally in your browser with JavaScript. GPXFIT never uploads your GPS coordinates to a server.
Drop a GPX or TCX file here or click to browse
GPX, TCX, or FIT — processed locally, never uploaded
The tail you're cutting, and where it comes from
You forgot to stop your watch, and it kept recording the drive home. That is the case that brings most people here, and it is why the uploaded activity shows an impossible average speed. Trimming removes those points before the file ever reaches Strava.
The start collects its own junk. A GPS watch records while it is still fixing its position, so the first points can be a stationary cluster on your driveway that drifts tens of meters while you put your helmet on. The ride to the trailhead counts the same way: if the activity starts when you leave the house rather than when the warmup starts, the file says so.
One thing this tool does not do: cut a section from the middle. The two sliders mark a single continuous range, and everything outside it goes.
Check the numbers while you drag
A live line above the sliders shows the distance, duration and point count of the current selection, and it moves as you drag. Below the tool sit two stat grids, the trimmed selection and the original, so the cost of the cut is visible before anything is exported: how much distance the drive home added, how much time the GPS-lock cluster burned.
Points outside the range are removed. Nothing inside the range is altered: coordinates, elevation and timestamps pass through exactly as the device recorded them.
Pauses inside the kept range stay pauses
When a device marks a stop and restart, it writes the pause into the file: a second track segment in a GPX, or another Track inside the lap in a TCX. A stop can also be left as a plain gap in the timestamps inside one segment, and that kind has no boundary to keep.
The trimmer keeps those boundaries. If you load a file with a pause in it and trim either end, the export still has one segment per stretch of recording, so the stop stays a break instead of becoming a straight line drawn across the cafe. Stopped-and-restarted recordings are not rare: 9 of the 38 GPS-bearing files in GPXFIT's test corpus contain at least one stop and restart, and the pause dataset has the per-file numbers.
The numbers follow the same rule. Distance, duration and elevation gain are summed within each stretch of recording, so the line across a recorded pause is never counted as distance and the time between one segment ending and the next starting is never counted as time moving. A stop left as a plain time gap inside a single segment is still counted, because nothing in the file marks it as a pause. This is the same rule the merger applies.
The export is GPX, whatever you loaded
The download is GPX 1.1 whether the input was GPX or TCX. Every kept point carries its latitude, longitude, and elevation and time where the source had them. Nothing is smoothed, resampled or snapped, and no points are invented to close a gap. The original file on your disk is never modified.
What the export drops is worth knowing before, not after. A TCX's lap structure, calories, heart rate and cadence do not carry into the GPX: the parser reads position, elevation and time, and the exporter writes those. If the sensor streams matter more than a clean track, keep the original TCX. Waypoints do not carry either. A GPX route imports as plain track points when the file has no track segment, and a file containing only waypoints is rejected at load with an error saying why.
FIT files, plainly
FIT is not supported here. Dropping a .fit file gets an error, not a silence. What works today: the File Inspector on the converter page decodes a FIT and exports its track as GPX, which this trimmer then takes. FIT writing and FIT repair are still unbuilt, and the repair page says where that stands.
After you download
The export keeps timestamps, so a file that Strava accepted before trimming still has what it needs; Strava rejects a GPX with no time data. Strava and Garmin Connect each compute distance and pace from the points you kept, so their figures describe the trimmed activity, not the original.
Keep the original file. The download is a new file ending in -trimmed.gpx; nothing writes back to what you loaded.
Two recordings that should be one is the opposite problem, and the mergers handle it: merge GPX and TCX files, or merge FIT files directly. The converter page covers what separates GPX, TCX and FIT if the export question is which format you should be holding.
Frequently asked questions
- Why does my GPX file need trimming?
- The most common case: you forgot to stop your GPS watch and it kept recording your drive home, which shows up on Strava as an impossible 60 km/h "run." Trimming removes those extra points before you upload.
- Does this upload my file anywhere?
- No. The file is read and parsed with JavaScript running in your browser tab. Nothing is sent to a server: this tool works even if you disconnect from the internet after the page loads.
- Can I trim FIT files here too?
- Not yet; the trimmer currently supports GPX and TCX. FIT trimming is on the roadmap; for now you can inspect a FIT file's contents on the File Inspector page.
- Will trimming change my elevation or distance data?
- Trimming only removes points outside your selected range; it doesn't alter the remaining points' coordinates, elevation, or timestamps.
- Can I cut a section out of the middle of my track?
- No. The two sliders mark one continuous range; everything before the start marker and after the end marker goes. Removing a middle section, like a wrong turn you want out of the record, is not something this tool does.
- Will my pauses survive the trim?
- Yes, when the file records them as structure rather than just a time gap: a second track segment in a GPX, or a second Track in a TCX lap. The kept range exports with one segment per stretch of recording, so a pause stays a break.
- What happens to heart rate, cadence, calories or laps?
- They don't reach the export. The GPX the trimmer writes carries position, elevation and time; sensor streams and lap markers are left in the source file. Keep the original if you need them.
- Can I trim a route rather than a recorded track?
- A GPX route loads and trims like a track when the file has no track segment, since its route points stand in for track points. A file with only waypoints has nothing to draw a line with and is rejected with an error. The export is always a track.