Merge and fix tracks

How to convert FIT or KML to GPX without losing heart rate

Updated

The app you want to use asks for a GPX. What you have is a .fit straight from your watch, or a .kml someone sent you. You find a converter, drop the file in, and the GPX that comes out shows your route but no heart rate. Here’s why that happens and how to avoid it.

Why heart rate gets lost

It comes down to how each format stores extra data.

FIT is what most sport devices write. Garmin’s developer site describes it as a protocol designed for storing and sharing data that comes from sport, fitness and health devices, and says sensors measure things like heart rate, speed and power during an activity.

GPX was built for positions. The TopoGrafix documentation defines points with position, optional elevation and time, and an extensions area where other schemas can add their own elements. Heart rate lives there, not in the core format. Garmin’s TrackPointExtension, for instance, defines a heart rate field in beats per minute and a temperature field in degrees Celsius.

So a converter has to do two things: read the heart rate from the FIT, and write it into the right extension in the GPX. If it skips the second step, the heart rate silently disappears. For a deeper look at the formats, see GPX vs FIT vs TCX vs KML.

FIT to GPX: a method that works today

If you use Strava, this method keeps heart rate, and Strava’s own help pages confirm each step:

  1. Upload the FIT to Strava. Strava says it accepts GPX, TCX and FIT files up to 25 MB that contain workout data, uploaded at strava.com/upload/select.
  2. Open the activity on the Strava website. Strava notes that exporting is only available on the website.
  3. Choose Export GPX from the activity’s ellipsis menu.

Strava says this GPX of your own activity contains your GPS coordinates, timestamps and accessory data like heart rate, cadence and temperature. Power is included only if it came from a power meter, not estimated power. Our guide on how to download a GPX file from Strava walks through it step by step.

If the activity came from a Garmin and is already on Strava, you can skip the upload and go straight to step 2.

KML to GPX: set expectations first

The OGC describes KML as an XML language focused on geographic visualization. It was made to show things on a map, so a KML export may well be just the line. If your KML has no heart rate inside, no converter can create it. Ask the person who sent it whether they have the original FIT, GPX or TCX instead.

Strava’s upload article lists GPX, TCX and FIT, not KML, so the Strava method above doesn’t apply here.

One option for KML is GPSBabel, a desktop program. Its documentation says it reads and writes KML tracks and handles simple KML on read fairly well, while complex handcrafted files may not read well. Its GPX documentation describes an option to write Garmin-specific extensions when such data is available. We could not confirm from its pages whether heart rate from a KML ends up in the GPX, so check the result.

How to check that heart rate survived

  1. Open the new GPX in a plain text editor.
  2. Search for hr. In files that use Garmin’s extension, it appears inside each point as a tag ending in hr with a number like 142.
  3. If there is no such tag anywhere, the heart rate didn’t make it.

Not sure how to open a GPX? See how to open a GPX file.

Converting in Trazo

Converting is built into Trazo, at trazo.run. FIT, KML, KMZ and GeoJSON go in, GPX comes out, and heart rate and temperature come along. That converted track can then be joined with other files, trimmed, labeled with your own points and turned into a 3D map video in horizontal or vertical format.

Sources

Your next route deserves its own video.

Claim your bibCreate your account

Sign up and turn your first route into a video.

Create my account

Claim a bib before launch and you’ll get full access. No spam.

Your bib: #0000

You’re in!

Full access is yours from race day. We’ll email you at .

That email already has a bib: #0000.

Too many tries in a row. Try again later.

Check your email: something’s missing, like the @ or the domain.

We couldn’t save your bib. Try again in a few minutes.