Home / Guides / How to Reduce a GPX File Size Without Losing Your Route

How to Reduce a GPX File Size Without Losing Your Route

8 min read · Updated March 4, 2026

You try to upload a route and the site rejects it: file too large. Or your old GPS unit stalls loading a track, or an email bounces the attachment. GPX files can balloon to many megabytes, and almost all of that weight is redundant. Here is why it happens and how to cut a file down by 80% or more without changing the route you see on the map.

Why GPX files get so big

A GPX file is text, and text is verbose. Every single track point is written out as a line of XML with latitude, longitude, elevation, a timestamp, and often heart rate and cadence too. Now consider how many points there are: a device recording once per second produces 3,600 points per hour. A six-hour ride is over 20,000 points. Each point might be 150–250 characters of XML, so the arithmetic runs into megabytes quickly.

The crucial insight is that most of those points are redundant. On a straight road, a point every second traces a line that two points could describe perfectly. All the intermediate points do is add file size. The art of shrinking a GPX is removing the redundant points while keeping the ones that actually define the shape.

What not to do

Two tempting shortcuts cause real damage:

  • Dropping every other point. Uniform decimation ignores geometry. It thins out straight sections (fine) but also chops corners and switchbacks (not fine), so the more you cut, the more your route deviates from reality in exactly the places that matter.
  • Rounding coordinates hard. Chopping decimal places seems to save space, but seven decimal places is about a centimetre and five is about a metre — go coarser and your track visibly staircases. It saves little and looks bad.

The right approach is geometric: remove points based on whether they contribute to the shape, not on their position in the list.

The Douglas-Peucker algorithm, explained simply

The Ramer-Douglas-Peucker algorithm is the standard, well-tested way to simplify a line, and it is what powers our simplify GPX tool. The idea is elegant:

  1. Draw a straight line from the first point of the track to the last.
  2. Find the point that lies furthest from that straight line.
  3. If that furthest point is closer than your chosen tolerance, then every point in between is close enough to the line to be thrown away — keep only the two endpoints.
  4. If it is further than the tolerance, that point clearly matters, so keep it and repeat the whole process on the two halves: first-point-to-kept-point, and kept-point-to-last-point.

Because the algorithm recurses into every section, it naturally keeps sharp turns (where points sit far from any straight line) and aggressively thins straightaways (where they do not). The single dial you control is the tolerance: the maximum distance, in metres, that a discarded point may sit from the simplified line.

Choosing a tolerance

Tolerance is the whole game, so it helps to have a feel for the numbers:

  • 1–2 metres: a conservative trim. The track looks identical at any zoom, yet you often remove half the points or more.
  • 5–10 metres: the sweet spot for most uploads. Expect an 80–95% reduction in points with no visible change at normal map zoom.
  • 20 metres and up: aggressive. Good for a rough overview or a tight upload limit, but corners start to visibly straighten.

Rather than guess, the simplify tool shows you the route thumbnail and the live point count and file size as you drag the slider, so you can watch points 24,180 → 1,240, file 5.1 MB → 260 KB update in real time and stop exactly where the shape still looks right.

What you keep and what you lose

Simplification keeps the first and last point of every segment, so your track never gets shorter at the ends. The points that survive keep all their attached data — elevation, timestamps, heart rate, cadence. The points that are removed take their per-point data with them, which is the whole point: you are deliberately storing the route more coarsely. Total distance may shrink by a hair, because a simplified line cuts microscopic corners, but at a sensible tolerance the difference is a rounding error.

Other ways to trim, in order of impact

  1. Simplify the geometry. Biggest win by far — this is the redundant-point problem above.
  2. Drop unneeded extensions. If you do not need heart rate and cadence in the copy you are sharing, converting to a plain track removes them. Converting to CSV for analysis also sidesteps XML verbosity entirely.
  3. Split very long files. If a single file is enormous because it covers a multi-day trip, keeping the stages separate can help — though usually simplification alone is enough.

Do it without uploading your route

Most "reduce GPX size" websites ask you to upload your file to their server. Remember what a GPX contains: the exact coordinates and times of where you were, usually starting at your front door. There is no reason a size-reduction tool needs that on a server. TrackKit's simplify tool runs the Douglas-Peucker algorithm entirely in your browser — your file is read, thinned and downloaded without ever being sent anywhere. Smaller file, same route, and your location stays yours.


Tools mentioned in this guide