Convert bulk exported Strava data to GPX
Published: 2024-06-28 12:00 +1200
Last Modified: 2025-04-19 16:06 +1200
Background
When you bulk export Strava data you may receive a zip file of a number of different file formats:
- .gpx
- .fit.gz
- .tcx.gz
Annoying. To get them all into gpx format follow these steps.
Method
Extract the .gz files
For Linux - Extract, or decrompress, .gz files using gzip -d filename.gz
. Use -dk
to keep the original .gz file.
For Windows - Extract .gz files using 7-zip. 7-zip allows you to select all files and extract them all in one go.
Convert .fit files to .gpx (requires Python)
Install the fit2gpx python library:
pip install fit2gpx
Or using pipx:
pipx install fit2gpx # or,
pipx inject [environment] fit2gpx
Note fit2gpx can also do the extracting in step 1 if not done already (see documentation.
Create and run a python script:
from fit2gpx import StravaConverter
DIR_STRAVA = 'path/to/strava_bulk_export_parent_folder/'
strava_conv = StravaConverter(
dir_in=DIR_STRAVA
)
strava_conv.strava_fit_to_gpx()
Converted files will be in the activities_gpx folder.
Convert .tcx files to .gpx (requires node.js.)
Download/clone tcx-to-gpx-converter.
Type npm install
from the clone folder's location.
Copy the tcx files into the input folder.
Type node convert.js
.
Converted files will be in the output folder.