Skip to content
Converts Garmin .TCX format to JSON
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Converts Garmin .TCX format to JSON. Simple, lightweight node script with a single dependency on npm split.

This is not a robust solution. It does not traverse an XML DOM. It instead parses the file line-by-line for elements using regex. Therefore, in order to parse a file or stream properly, the stream should be formatted so there is one XML node on each line, as TCX files are formatted when exported from Garmin Connect. For any questions, consult the sample.tcx and the corresponding sample.json.

Script takes an input stream, and logs stringified JSON to STDOUT:

$ cat sample.tcx | node tcx_to_json.js >> sample.json
You can’t perform that action at this time.