Generate TCX File

How to Generate a TCX File for Strava (Step-by-Step)

A TCX file is a structured workout file that can contain much more than a route line. Unlike GPX, which is mostly focused on GPS geometry, TCX can also hold timestamps, heart rate, cadence, and power data. That makes it the better format when you want Strava to read the upload as a real training activity rather than just a path on a map.

People usually need to generate a TCX file when a device failed to record, an export is broken, or they want to build a custom activity from scratch. You can do that manually in XML, export from a Garmin device, or use a TCX file creator like ForgePace. If you are still comparing formats, this TCX vs GPX Strava guide explains when each export makes sense.

Better Than GPX for Metrics

TCX is usually the stronger choice when you need effort data, not just route coordinates.

Built for Activity Data

The format was designed to describe training sessions with time progression and sensor fields.

Useful for Strava Imports

A valid TCX upload can recover a missed session or replace a damaged export from another platform.

What a good TCX file should contain

If your goal is to generate a TCX file that uploads cleanly and looks credible in Strava, the file needs more than valid XML. It should combine route data, timing, and workout signals that fit the effort you are trying to represent.

GPS track

Latitude, longitude, and elevation points should follow a believable route instead of cutting through buildings or jumping between roads.

Timestamps

Each trackpoint needs clean chronological timing so Strava can reconstruct speed, splits, and elapsed time correctly.

Heart rate

Useful TCX files include bpm data that ramps up and down naturally rather than staying flat from start to finish.

Cadence

Cadence helps runs and rides look like real efforts, especially when you want richer training analysis after upload.

Watts

Power matters most for cycling files. It should react to terrain and effort instead of reading like an arbitrary constant.

1. Write the XML manually

You can hand-build a TCX file in XML, but this is slow and fragile. You need correct namespaces, timestamps, lap structure, and trackpoints, so one formatting mistake can break the upload.

2. Export from Garmin or another device

If the activity already exists on a watch or bike computer, exporting the original TCX is the cleanest path. The downside is obvious: it only works if the workout was recorded in the first place.

3. Use a TCX file creator

A dedicated generator is faster when you need to rebuild or create a workout. This is the easiest way to generate a TCX file for Strava without editing raw XML by hand.

Step-by-step: generate a TCX file with ForgePace

Step 1

Open the ForgePace TCX generator and choose your activity type, starting point, and target duration.

Step 2

Let ForgePace build the route on real roads through OSRM-based routing instead of drawing a simplistic straight line.

Step 3

Add the workout metrics you care about so the file includes realistic timing, heart rate, cadence, and power behavior.

Step 4

Download the TCX file and follow the import flow in the Strava upload guide if you need help with the final step.

Why ForgePace creates stronger TCX files

ForgePace is built around realistic output, not just valid syntax. Routes are generated on real roads through OSRM, which produces GPS tracks that follow actual streets instead of vague line segments. That matters when you want the activity map to look plausible after import.

Workout signals also need to behave like a human effort. ForgePace models heart rate with natural lag rather than instant jumps, and it correlates watts with terrain so climbs can read differently from flatter sections. If you want a broader overview of the product workflow, the main TCX file generator guide covers the core use case in more detail.

Once the file is ready, the final step is straightforward: upload it through Strava on desktop. This Strava file upload tutorial walks through the import flow for TCX, GPX, and FIT files.

FAQ

Why generate a TCX file instead of a GPX file?

Use GPX when you only need route geometry. Use TCX when you need timestamps and workout metrics such as heart rate, cadence, or watts. This comparison is covered in more detail in ForgePace's TCX vs GPX guide.

Can Strava import a custom TCX file?

Yes. Strava accepts TCX uploads through its web-based file import flow, which is why a clean and valid TCX export is useful for rebuilt or planned activities.

What makes a TCX file look realistic after upload?

Believable route geometry, ordered timestamps, and sensor data that matches the effort all matter. Flat heart rate lines or impossible GPS jumps are usually the fastest way to produce a weak file.

Ready to Build?

Try ForgePace — generate your TCX in 2 minutes

Build a realistic route, add training metrics, download the file, and move it straight into your Strava workflow.