Why FIT files get corrupted

A FIT file that Garmin Connect or Strava refuses usually did not fail at random. It was cut off before the device finished writing it.

How a FIT file is built

Summary messages, which are the lap, session and activity messages, are normally written at the end, when you press save. They hold the totals that platforms show: start time, duration, distance and averages.

What an interrupted save does

The device writes records while you move, so the body of the file is mostly there even if something goes wrong. If the battery dies, the device crashes or you unplug it during a sync, three things can be missing at once:

  1. The summary messages, because they were never written.
  2. A correct data size in the header.
  3. The final checksum.

A platform that validates the file sees a size or checksum that does not match, or no session, and rejects it. The recorded data may still be sitting in the file.

What can and cannot be recovered

RecoverableNot recoverable
Every record written before the point of damageAnything after the first unreadable record
Totals, rebuilt from those recordsData the device never wrote
A valid header size and checksumThe original summary values, if they were lost

If the sport was stored only in the lost summary, the tool cannot know it, so you choose it.

Trying the repair tool

  1. Get the original file from the device or platform. See how to export original activity files.
  2. Open the FIT repair tool and add the file. Everything runs in your browser, files are never uploaded and no account is needed.
  3. The tool finds the header and reads records until the first unreadable one. It keeps everything before that.
  4. It rebuilds the missing lap, session and activity messages from the recovered records, using start time, elapsed time, distance, and average and maximum heart rate where available.
  5. It writes a correct header size and checksum. Download the result.

If the activity was split in two by the failure, you can then combine the parts.

Repair output passes an independent FIT decoder's strict validation. We have not tested uploads to Garmin Connect or Strava, so a platform could still decline a file for its own reasons.

Reducing the risk

Sources