Free tool

Rewrite elevation across an activity.

Rewrite the elevation profile on a FIT, GPX, or TCX activity. Fix trainer rides that recorded as a flat line, smooth out noisy phone-GPS altitude jitter, or refetch real-world terrain elevation from Mapbox for any route. Two strategies: linear ramp from a start altitude and total gain, or proper DEM-sampled terrain refetch. Free, in-browser, no signup.

altitude: nonebecomesaltitude: 412 m

How it works

  1. 1

    Drop a file

    FIT, GPX, or TCX - we keep every other field intact.

  2. 2

    Pick a strategy

    Linear ramp from a start altitude and total gain, or sample real terrain from Mapbox tilequery.

  3. 3

    Download the rewritten file

    New elevation chart side-by-side with the original so you can sanity-check before download.

What you get

  • Linear ramp from a start altitude and total gain, distributed by distance
  • Mapbox terrain DEM refetch for real-world elevation at each trackpoint
  • Side-by-side before-and-after elevation profile preview
  • Total elevation gain auto-recomputed after rewrite
  • Same format in, same format out (FIT, GPX, or TCX)
  • Works offline for ramp mode - terrain mode needs Mapbox

When to use this

Reach for the elevation setter in two situations. First, when an indoor trainer ride records as a flat zero-altitude line and your training log looks like every climbing workout you ever did had zero meters of vert - ramp mode fixes this by backfilling a plausible elevation profile that matches what the virtual ride simulated. Second, when an outdoor recording (especially phone-GPS-based) has obviously noisy or wrong altitude - terrain refetch replaces the noise with DEM-based values that are consistent across the route. Do not use this on outdoor rides where your head unit's barometric altimeter was working correctly; the original data is likely more accurate than refetch.

How it works under the hood

For ramp mode, the tool decodes your file, computes cumulative distance at every trackpoint, and writes a new altitude value at each point: altitude = startAltitude + (cumulativeDistance / totalDistance) * totalGain. The distribution is linear by distance, so the resulting profile is a perfectly straight ramp - simple but reasonable for indoor sessions. For terrain mode, the tool batches your trackpoints into Mapbox tilequery API calls (chunks of around 100 points per request), receives the elevation at each lat/lon, and writes the result back to the altitude field. After either mode, total ascent and descent are recomputed from the new profile and the session/lap totals are updated. The file is re-encoded through the official Garmin SDK (FIT) or native XML serialization (GPX/TCX).

Common mistakes

Three to flag. First, refetching DEM elevation for a Zwift or other indoor virtual ride - the GPS coordinates Zwift writes do not correspond to real terrain, so DEM refetch produces nonsense. Always ramp indoor rides. Second, refetching DEM for an outdoor ride that already had a working barometric altimeter - you will replace accurate altimeter data with less accurate DEM data and your total elevation gain will drop. Only refetch if the original altitude was clearly broken. Third, using a ramp total that does not match the ride - a 30-minute Zwift Watopia hills session with 800m of climb needs an 800m ramp target, not "1000m to be safe" - over-ramping pollutes weekly climb totals.

Frequently asked questions

Why is my trainer ride showing as a flat line?
Most smart trainers and indoor apps (Zwift, Wahoo SYSTM, TrainerRoad, Rouvy) either omit the altitude field entirely or write a constant zero. The result on Strava is a zero-elevation line and zero elevation gain even if the workout simulated a 1000m climb. The elevation setter's ramp mode lets you backfill a plausible altitude profile - enter starting altitude and total gain, and the tool distributes the gain across the activity by cumulative distance so the elevation chart matches what the ride felt like.
How do I refetch real terrain elevation for a phone GPS recording?
Use the terrain mode. The tool walks every trackpoint, queries Mapbox's terrain DEM tiles for the elevation at that lat/lon, and writes the result back to the altitude field. The output replaces noisy or wildly inaccurate phone GPS altitude with consistent DEM-based values accurate to within 5-10m in most terrain. Useful for runs and rides recorded on a phone where the barometric altimeter was absent or unreliable.
How accurate is the Mapbox terrain DEM?
Mapbox terrain tiles combine SRTM (Shuttle Radar Topography Mission) and other Digital Elevation Model sources at roughly 30m horizontal resolution. Vertical accuracy is around 5-10m in non-mountainous terrain, up to 15-20m in dense forest or steep alpine. Better than phone GPS altitude (often plus-or-minus 20-50m), worse than a properly-calibrated barometric altimeter (plus-or-minus 1-3m).
Will my total elevation gain change after the rewrite?
Yes - the tool recomputes total ascent and descent from the new elevation profile and updates the session and lap totals to match. For trainer rides moving from flat-line to ramped, total ascent will go from 0 up to your specified gain. For phone GPS recordings being refetched against DEM, total ascent typically goes down 10-30% because phone GPS altitude noise inflates apparent climb.
Does this affect VAM, grade, or power data?
Elevation directly affects any grade-derived metric (grade-adjusted pace, VAM, power-vs-grade plots) computed downstream. The HR, power, cadence, speed, lat, and lon streams are untouched. Total distance and moving time are unchanged. After rewrite, derived metrics like VAM and GAP will update on the next platform recompute - Strava recalculates on re-upload.
Should I ramp or refetch for a Zwift ride?
Ramp. Zwift rides simulate virtual routes that do not correspond to real-world terrain - refetching real DEM elevation from the GPS positions (which Zwift writes as fake coordinates near Watopia) produces nonsense. Use ramp mode and enter the total simulated climb Zwift reported as your gain target.
What about a real outdoor ride with noisy altitude?
Use terrain refetch. The lat/lon coordinates are real, so DEM sampling produces meaningful elevation. For rides where the barometric altimeter was solid (most modern Garmin Edge and Wahoo ELEMNT units), the original altitude is probably more accurate than DEM refetch and you should leave it alone. For phone GPS recordings or rides where the altimeter clearly drifted (start altitude does not match end altitude even though you ended where you started), refetch is the fix.
Is the elevation setter free?
Yes - the ramp mode is fully free and runs offline. Terrain mode uses Mapbox's tile API and is also free for the volume any single user generates. No signup, no upload, no upsell.

Save your training to a real log

Fix the climb once, then keep every ride and run analyzed in one place. Domestique reads the data for you.

Create free account