TCX – Training Center XML (Garmin)

.tcx · GPS

TCX (Training Center XML) is Garmin's XML format for recorded workouts and planned courses. A GPX file is a line on a map. A TCX file is a training log: it knows the sport, the laps, the calories and your heart rate at every recorded point. You most likely have one because you exported an activity from Garmin Connect or Strava, or because an indoor training app saved the session that way.

Where TCX comes from

Garmin introduced the format in 2007 together with Training Center, its desktop program for Forerunner and Edge owners. The name in our catalogue, Garmin Training Center, is really the name of that program. The schema in use is TrainingCenterDatabase v2, and Garmin still publishes it, but there has been no newer version. Garmin devices now record in the binary FIT format, and TCX survives as an export and exchange format that almost every sports platform reads. Its advantage over FIT is that it is plain text: you can open it in any editor and see what is inside.

What a TCX file stores

The root element TrainingCenterDatabase holds activities, courses and workouts.

  • Activity: a recorded session. The Sport attribute allows only three values: Running, Biking and Other. The start time serves as the ID.
  • Lap: every activity is divided into laps with total time, distance, maximum speed, calories, average and maximum heart rate, intensity (active or resting) and the way the lap was triggered (manually, by distance, time, location or heart rate).
  • Trackpoint: time, position, altitude in metres, cumulative distance, heart rate and cadence. The position is optional, which is why a session on a turbo trainer without any GPS is still a valid TCX file.
  • Extensions: Garmin's Activity Extension adds speed, running cadence and power in watts to each point, and average speed, steps and average and maximum watts to each lap.
  • Course: a route to follow, with a name of at most 15 characters.

What TCX cannot hold is temperature. There is no field for it, so an export from FIT to TCX drops it.

How to open a TCX file

  • Sports platforms: Strava accepts TCX uploads next to FIT and GPX. Garmin Connect has an Import Data page for the same three formats, and komoot imports TCX as a planned route or a completed activity.
  • Windows, macOS, Linux, Android: GPXSee, a free open-source viewer, shows the track with elevation, heart rate and cadence graphs. Garmin BaseCamp imports TCX as well.
  • Any text editor or browser: enough to check the sport, the lap totals or whether the points carry coordinates at all.

Common TCX problems

TCX file won't upload to Strava

Strava requires a time on every trackpoint. Position, elevation and heart rate are optional. A file whose points lack <Time> is refused. From the laps Strava takes only the track, total time, distance and calories, so averages stored there are recalculated.

The sport shows as "Other"

The format itself only knows running, biking and other. Swimming, hiking or skiing cannot be expressed in valid TCX, so the receiving platform has to guess or you set the sport by hand after the upload.

TCX to GPX gives an empty track

An indoor session has heart rate and cadence but no positions. A GPX track point cannot exist without latitude and longitude, so there is nothing to convert. Keep such workouts in TCX or FIT.

Course name is cut off on the device

The 15-character limit comes from the schema. Name courses briefly.

Converting TCX

The usual target is GPX, because map apps, hiking GPS units and route planners want it. Our converter writes GPX 1.1 and keeps latitude, longitude, elevation, time, heart rate and cadence for every point, the last two in Garmin's TrackPointExtension that Strava reads. Speed and power from the TCX extensions are not carried over. Lap totals such as calories have no place in GPX. Each lap start becomes a waypoint named LAP001, LAP002 and so on, and a TCX course becomes a GPX track. Details are on the TCX to GPX page.

In the opposite direction, GPX to TCX produces a course with heart rate and cadence at the points, one lap with recomputed totals and a name shortened to 15 characters. Strava reads TCX courses, other services may expect an activity. For Google Earth, convert to KML or KMZ. If your source is a FIT file from the watch, see FIT to GPX.

TCX at a glance

DeveloperGarmin
Introduced2007, with Garmin Training Center
Current schemaTrainingCenterDatabase v2 with Activity Extension v2
TypeXML text, uncompressed
Storesactivities with laps, courses, workouts; heart rate, cadence, power, calories
Does not storetemperature, sports other than running and biking
Typical useexporting and moving workouts between sports platforms

Sources: Garmin's TCX schema and Activity Extension, and Strava's upload documentation, which states exactly what it reads from a TCX file.

We can convert TCX into

Documents

PDF DOCX DOC ODT TXT HTMLDOCMDOTDOTXFODTOTT RTFUOTPDF/AABWAWTFOZABW

Spreadsheets

XLSX XLSODSDBFDIFFODSOTSSLKUOSXLSMXLTXLTXGNUMERIC

eBooks

GPS

GPX KMLKMZARCCUPGDBGPIGTMHTIGCLOCNMEAOSMUSRVCF

Data

CSVJSONXMLYAMLSQLTSVJSONL

Markup languages

MDTEXRSTADOCWIKIORGDOCBOOKCONTEXTDOKUWIKIHADDOCKICMLIPYNBJATSJIRAMANMSMUSEOPMLTEITEXITEXTILETYPXWIKIZIM

GIS and maps

GEOJSONSHPGPKGGMLFGBGEOJSONLGMTJMLMIFSQLITETAB