TCX File Documentation


Summary

A .tcx file is a Training Center XML file, Garmin’s XML format for workouts and activities. Unlike a plain GPS track it stores fitness metrics — heart rate, cadence, calories, laps and structured workouts — alongside the GPS points. Its MIME type is application/vnd.garmin.tcx+xml. You upload it to Garmin Connect or Strava to view and analyse the activity, or open the raw XML in any text editor. Converting .tcx to .gpx is common when an app wants only the GPS track; converting to FIT loads it onto a Garmin device.

Technical details

FeatureValue
Full nameTraining Center XML (TCX)
File extension.tcx
MIME typeapplication/vnd.garmin.tcx+xml
Format typeXML text (GPS + fitness activity data)
DeveloperGarmin
Introduced2007 (with Garmin Training Center software)
Open standardPartial — schema is published, but Garmin-defined
EncodingUTF-8 XML; no binary signature
Root element<TrainingCenterDatabase>
NamespaceTrainingCenterDatabasev2 (Garmin XSD)
RecordsActivities, laps, trackpoints, workouts, courses
Per-trackpoint dataTime, position, altitude, distance, heart rate, cadence
ExtensionsSpeed and power (watts) via Garmin TPX extension
vs GPXAdds fitness metrics GPX lacks natively (HR, cadence, laps)
vs FITHuman-readable XML; FIT is Garmin’s compact binary device format
Opened withGarmin Connect, Strava, GPXSee, BaseCamp; Notepad++ (raw)
Converts to.gpx, .fit, .kml, .csv
Related extensions.gpx, .fit, .kml, .geojson
Specificationwww8.garmin.com/xmlschemas/TrainingCenterDatabasev2.xsd
Structure at a glance

TCX is plain UTF-8 XML with no binary signature. It is identified by its root element, <TrainingCenterDatabase>, in Garmin’s TrainingCenterDatabasev2 namespace, after the usual <?xml version="1.0"?> declaration. Inside, an <Activity> carries a Sport attribute and breaks into <Lap> elements, each holding a <Track> of time-stamped <Trackpoint> elements with position, altitude, distance, heart rate and cadence. Because it is text, any editor can read it directly.

What is a TCX file?

A .tcx file is a Training Center XML document, an XML format Garmin introduced around 2007 for its (now discontinued) Garmin Training Center desktop software. It records an athletic activity — a run, ride or swim — as a time-ordered stream of GPS points enriched with fitness data. The name comes from the software; the format outlived it and is now a widely supported interchange for moving activities between platforms.

What sets TCX apart from a plain GPS track is that it was designed to carry more than location. A GPX file natively models position, elevation and time; TCX adds heart rate, cadence, calories, per-lap summaries and even structured workouts and navigable courses as first-class elements. It is plain UTF-8 XML, so a text editor shows the whole thing, and its MIME type is application/vnd.garmin.tcx+xml. The sections below walk the schema: the root element, the activity-lap-track hierarchy, what each trackpoint stores, and how power and speed ride in via extensions.

The TrainingCenterDatabase root and namespace

Every TCX file is identified not by a byte signature but by its XML root. After the standard declaration it opens with a <TrainingCenterDatabase> element bound to Garmin’s version-2 namespace, whose schema is published as TrainingCenterDatabasev2.xsd:

<?xml version="1.0" encoding="UTF-8"?>
<TrainingCenterDatabase
    xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2">
  <Activities>
    <Activity Sport="Running">
      <Id>2025-07-22T06:30:00Z</Id>
      <Lap StartTime="2025-07-22T06:30:00Z"> ... </Lap>
    </Activity>
  </Activities>
</TrainingCenterDatabase>

Under the root, a TCX document can contain one of several top-level collections: <Activities> for recorded sessions, <Workouts> for structured training plans, and <Courses> for navigable routes. The common case is <Activities>. Because the whole file conforms to a published XSD, a validating parser can check that every element and value is well-formed, which is part of why TCX became a reliable interchange format between services that would otherwise not share data.

Activity, Lap and Track: the recording hierarchy

A recorded session is an <Activity> whose Sport attribute (Running, Biking, Other) classifies it, and whose <Id> is the start timestamp. The activity is divided into one or more laps, and each lap contains a track of individual points. This three-level nesting — activity, lap, track — is the backbone of the format.

<Lap StartTime="2025-07-22T06:30:00Z">
  <TotalTimeSeconds>1830.0</TotalTimeSeconds>
  <DistanceMeters>5000.0</DistanceMeters>
  <Calories>312</Calories>
  <AverageHeartRateBpm><Value>148</Value></AverageHeartRateBpm>
  <MaximumHeartRateBpm><Value>171</Value></MaximumHeartRateBpm>
  <Intensity>Active</Intensity>
  <Track> ... Trackpoints ... </Track>
</Lap>

The <Lap> element carries per-lap summaries that TCX stores explicitly rather than making a reader compute them: total time, distance, calories, average and maximum heart rate, and an Intensity flag. These lap rollups are exactly the fitness metrics a plain GPS format has nowhere to put, and they are why coaches and training platforms prefer TCX for interval work: each interval is a lap with its own aggregated numbers.

Inside a Trackpoint: position plus biometrics

The finest-grained element is the <Trackpoint>, one per sample (typically one per second). It pairs the GPS fix with the biometric readings captured at that instant:

<Trackpoint>
  <Time>2025-07-22T06:30:05Z</Time>
  <Position>
    <LatitudeDegrees>51.5074</LatitudeDegrees>
    <LongitudeDegrees>-0.1278</LongitudeDegrees>
  </Position>
  <AltitudeMeters>35.2</AltitudeMeters>
  <DistanceMeters>42.0</DistanceMeters>
  <HeartRateBpm><Value>145</Value></HeartRateBpm>
  <Cadence>86</Cadence>
</Trackpoint>

Each trackpoint has a <Time> in ISO 8601 UTC, an optional <Position> with latitude and longitude in decimal degrees, an <AltitudeMeters>, a running <DistanceMeters> (cumulative distance, not per-segment), and the sensor readings the device captured: <HeartRateBpm> and <Cadence>. Note the wrapping: heart rate is not a bare number but a <Value> inside <HeartRateBpm>, a small schema quirk that trips up hand-written parsers. If a device lacked a sensor, the corresponding element is simply absent, which is why a TCX from a watch with no chest strap has no heart-rate fields at all.

Extensions: how speed and power get in

The base TCX schema has no native element for running speed or cycling power (watts), both of which came into wide use after the format was designed. TCX handles this the way XML formats usually do: an <Extensions> element that carries vendor-defined children under their own namespace. Garmin’s activity-extension schema (commonly the TPX element) is what holds Speed and Watts per trackpoint.

<Extensions>
  <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2">
    <Speed>3.35</Speed>
    <Watts>220</Watts>
  </TPX>
</Extensions>

This extension mechanism is the reason a TCX file can grow to carry data the original 2007 schema never anticipated without breaking older readers, which ignore extension elements they do not recognise. It also explains why power data sometimes “disappears” in conversion: a tool that does not read the TPX namespace silently drops it.

TCX against GPX and FIT

Three formats dominate the fitness-file world, and knowing where TCX sits explains the common conversions. GPX is the open, universally accepted GPS-exchange format, but it models mainly location, elevation and time, and pushes anything else into vendor <extensions>. TCX carries the fitness data (heart rate, cadence, laps, structured workouts) as native elements, so it holds more, but it is a Garmin-defined format rather than a neutral standard. FIT is Garmin’s compact binary format that watches and bike computers actually record in; it is the most efficient but the least human-readable.

So the two everyday conversions follow directly from these roles. TCX to GPX strips the activity down to a plain GPS track for an app that only wants the route, at the cost of the heart-rate and cadence data GPX cannot natively hold. TCX to FIT packs a workout or course into the binary form a Garmin device expects, to load it onto the watch. Tools such as GPSBabel and GPS Visualizer perform both, and platforms like Garmin Connect, Strava and TrainingPeaks accept TCX directly for viewing and analysis.

A note on what a TCX reveals

TCX is plain XML with no executable content, so the file itself is harmless to open. The consideration worth naming is privacy of content rather than any file-based risk. Like any activity recording, a TCX contains exact GPS coordinates and precise timestamps, so a file that starts and ends at your home discloses where you live and when you are out, and its heart-rate stream is personal health data. Before sharing a TCX publicly it is worth trimming the points near your home and deciding whether to keep the timestamps and biometrics. That is a property of the data the file honestly records, not a defect in the format.

References