How to export Apple Health workout routes as GPX

In Health Exporter & Shortcuts, a paid iPhone app (US$2.99 once on the App Store), open the Workouts tab, pick the period and activity types, switch on Include GPS Route, choose JSON + GPX (zip) and tap Export ZIP. You get a zip archive with one GPX 1.1 file for every workout that has a route, with the heart rate measured along the way written onto the track points, next to a JSON file describing every workout in the export.

Step by step #

  1. Open Health Exporter and allow access to workouts and workout routes when iOS asks. Routes are a permission of their own, so you can allow workouts and still refuse routes.
  2. Open the Workouts tab and choose the period under Range, exactly as for health data: Yesterday, 7 Days, 30 Days, or your own dates. Activity Types lists the kinds of workout recorded in that period, with how many of each, all ticked to begin with; untick the ones you do not want.
  3. Under Route, switch on Include GPS Route. Under Format, choose JSON + GPX (zip). The button below changes to Export ZIP. From version 1.8.0, Route appears only while File Format, just above it, is on JSON, its default: a Markdown export carries no route.
  4. Tap Export ZIP and save the archive from the share sheet.

In the Shortcuts app the same choice is the GPS Route parameter of the Export Workouts action, with three options: No route, JSON only and JSON + GPX (zip). The Shortcuts guide shows how to save the result to a folder in Files.

Routes are dense, with a point every few seconds, so a wide period with many outdoor workouts produces a large archive. Export the period you need rather than everything at once.

What is in the archive #

workouts_export_<timestamp>_<suffix>.zip
└── workouts_export_<timestamp>_<suffix>/
    ├── workouts_export_<timestamp>_<suffix>.json
    └── routes/
        └── <activity>-<YYYY-MM-DD>-<workout id>.gpx   one per workout with a route

The workout export format reference specifies every key of the JSON.

What a GPX file contains #

Each file is a GPX 1.1 document holding one track, named after the activity and its start time:

This is a complete file. It is the one the app’s format test compares the generated GPX against, byte for byte, built from five invented points:

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="APP_VERSION" xmlns="http://www.topografix.com/GPX/1/1" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1">
  <metadata>
    <time>2026-02-10T08:10:00Z</time>
  </metadata>
  <trk>
    <name>hiking 2026-02-10T07:30:00Z</name>
    <type>hiking</type>
    <trkseg>
      <trkpt lat="45.000000" lon="9.000000"><ele>145.87</ele><time>2026-02-10T07:30:00Z</time><extensions><speed>1.09</speed><course>28.73</course><hAcc>3.91</hAcc><vAcc>1.22</vAcc><gpxtpx:TrackPointExtension><gpxtpx:hr>142</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>
      <trkpt lat="45.000012" lon="9.000007"><time>2026-02-10T07:30:01Z</time><extensions><speed>1.11</speed><course>29.40</course><hAcc>3.88</hAcc><gpxtpx:TrackPointExtension><gpxtpx:hr>142</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>
      <trkpt lat="45.000025" lon="9.000015"><ele>146.20</ele><time>2026-02-10T07:30:02Z</time><extensions><speed>1.14</speed><hAcc>3.85</hAcc><vAcc>1.18</vAcc><gpxtpx:TrackPointExtension><gpxtpx:hr>142</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>
    </trkseg>
    <trkseg>
      <trkpt lat="45.000200" lon="9.000100"><ele>151.40</ele><time>2026-02-10T07:34:00Z</time><extensions><speed>0.98</speed><course>31.20</course><hAcc>4.10</hAcc><vAcc>1.30</vAcc></extensions></trkpt>
      <trkpt lat="45.000210" lon="9.000108"><ele>151.50</ele><time>2026-02-10T07:35:01Z</time><extensions><speed>1.02</speed><course>31.90</course><hAcc>4.05</hAcc><vAcc>1.28</vAcc><gpxtpx:TrackPointExtension><gpxtpx:hr>146</gpxtpx:hr></gpxtpx:TrackPointExtension></extensions></trkpt>
    </trkseg>
  </trk>
</gpx>

In a real file the creator attribute holds the app’s name, version and build. That value changes with every build, so the test replaces all of it with a placeholder, which is why it reads APP_VERSION here. Every gap in the file is deliberate: the second point has no elevation because its altitude was invalid, the third has no heading because it was unknown, a pause splits the track into two segments, and the fourth point carries no heart rate because no reading was within 30 seconds of it.

Before you import it somewhere #

GPX is the standard route format that fitness and mapping apps import, but each app decides for itself what it reads from a file. Whether a given service imports these files cleanly, and whether it shows the heart rate from the TrackPointExtension, is up to that service, so try one file before you import a batch. Some differences are expected whatever you use:

The Health app’s own Export All Health Data includes route files as well, but only for your entire history at once, inside one large archive, and with each workout drawn as a single segment however often it was paused.

Where your routes go #

Routes are off by default, and the app reads them only when you switch them on for an export. Health Exporter never asks for location permission and cannot see where you are: it reads only routes your device already recorded, and only while producing an export you asked for, from the app or from a shortcut you built or scheduled. The coordinates go into your file and nowhere else. The app’s anonymous usage statistics record only which of the three route options you picked, never a coordinate, as the privacy policy describes.

A route shows where you have been, often including where you live. Once you save or share the file, its contents are wherever you put them, so look at what a service will make public before you upload to it.