fileforge

FIT to GPX › Guides

Recover a FIT file that was cut off when the battery died

Your bike computer or watch died mid-ride and the activity file it left behind is refused everywhere as "corrupt". In most cases the ride is still in there. Here is how to get it back, either as a repaired FIT file or as GPX, without installing anything and without uploading the file.

Verified sample Steps and sample produced by running this site's converter on a synthetic file.

Why the file is rejected

A FIT file starts with a small header that says how many bytes of data follow, and ends with a checksum. The device writes the header when the recording starts and fixes up the size and checksum when you press stop. If the power goes first, the header still claims the full size, the checksum is missing, and the last record is often only half written. Strict readers see the mismatch and give up on the whole file, even though every record before the cut is fine.

Steps

  1. Copy the file off the device first. Connect the device by USB and copy the activity file (it ends in .fit, usually in an Activity folder) to your computer. Work on the copy, so a failed attempt can never touch the original.
  2. Open the FIT to GPX converter and drop the copied file on it, or click to choose it. It runs in the browser, so there is nothing to install, and the file is read on your computer rather than sent anywhere.
  3. Read the Inspection box. For each FIT file the page lists in plain words what is wrong: a header that promises more data than exists, a record cut off part-way, a missing checksum, a missing session summary, and how many position records can be recovered. The point count also says "damaged file, recovered every complete record" when the file needed repair.
  4. Download the repaired .FIT with the button in the Inspection box (it appears only when the file is damaged and has recoverable records). The repaired file keeps every complete record exactly as the device wrote it, so heart rate, power and laps recorded before the cut stay. It gets a correct header size and both checksums, and a minimal session summary if none survived. Upload it to the app that refused the original.
  5. Check the point count against the ride. A ride recorded once a second should have roughly one point per second of moving time. A few points short at the end is expected: those are the moments the device never finished writing.
  6. Or download the GPX. The file keeps latitude, longitude, time, elevation (when the device recorded it) and heart rate. Upload that GPX wherever the FIT file was refused.
  7. Several damaged files? Drop them all at once: with "Convert each file to its own GPX" ticked (the default on this page), each one is repaired and converted separately and you download them together as a .zip. If the ride was restarted after you charged the device and you want one track, use the merge tool instead; see joining a ride recorded in several parts.

Sample: before and after

The fixture is a synthetic 300-point FIT recording with the last 50 bytes cut off, the same shape a dead battery leaves. The first two blocks below are produced by the converter's own inspection code when this page is built.

Before (what the Inspection box says about the damaged file):

ride-truncated.fit (4,202 bytes)
  - The header promises 4,236 bytes of data but only 4,188 are there.
  - The file ends mid-record: 8 bytes after byte 4194 are an unfinished record.
  - The closing checksum is missing or wrong.
  - There is no session summary; repair adds a minimal one built from the recovered records.
  - 296 position records can be recovered.

After repair (inspecting the repaired file; it also reads cleanly in a strict FIT parser):

ride-truncated-repaired.fit (4,288 bytes)
  - No damage found: header and checksum are valid, 296 position records.
  - session summary: present; header size 14

Or as GPX (what the converter reports, and the first and last track points):

ride-truncated.fit (FIT): 296 points — damaged file, recovered every complete record
1 file(s) · 296 points in · 296 points out · 0 exact duplicates removed · 1 segment(s)

<trkpt lat="51" lon="-0.1"><time>2026-01-01T09:00:00.000Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>120</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>
...
<trkpt lat="51.0295" lon="-0.099182"><time>2026-01-01T09:04:55.000Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:hr>145</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>

296 of the 300 points were recovered. The 4 that are missing were in the cut-off bytes, so no tool could get them back. The undamaged version of the same file gives 300 points.

What this cannot fix

Open the FIT to GPX converter