How to export Apple Health data to JSON

Install Health Exporter & Shortcuts, a paid iPhone app (US$2.99 once on the App Store), open its Health Data tab, pick a period and the data types you want, and tap Export JSON. The app reads those types from Apple Health on your iPhone and writes one JSON file holding one value per day for each type, which you then save to Files or send to another app from the share sheet.

Why not the Health app’s own export #

The Health app can export too: Export All Health Data, in your profile, produces a zip of XML holding your entire history as raw samples. It is complete, and it is hard to work with: there is no choice of period or data type, and a day of steps arrives as many separate samples rather than as one total. Health Exporter writes only what you selected, already added up per day, in a shape a few lines of any language can read.

Step by step #

  1. Open Health Exporter and allow access to the Health data you want to export. iOS lists the data types and lets you allow each one separately, and you can change your answers later in Settings > Privacy & Security > Health > Health Exporter.
  2. In the Health Data tab, choose the period under Range: Yesterday, 7 Days or 30 Days, each counting whole days up to yesterday. Include Today, on by default, adds the day in progress. To pick your own dates instead, tap the date range below the picker and set From and To.
  3. Under Data Types, tick the types you want. All of them are ticked to begin with, and All and None select or clear the whole list.
  4. Tap Export JSON. When the file is ready the share sheet opens: save it to Files, or send it to the app that will read it. From version 1.8.0, File Format above the button chooses between JSON, the default, and Markdown, which the AI assistant guide describes.

What the file looks like #

This is a complete export of five data types over four days. It is the file the app’s format test compares the encoder’s output against, byte for byte, with invented values, so it is exactly the shape you get:

{
  "exportInfo" : {
    "appVersion" : "1.0.0",
    "buildNumber" : "42",
    "dataTypes" : [
      "stepCount",
      "weight",
      "sleepTime",
      "restingHeartRate",
      "vo2Max"
    ],
    "endDate" : "2026-02-10",
    "exportDate" : "2026-02-10T18:30:00Z",
    "measurementSystem" : "metric",
    "startDate" : "2026-02-07"
  },
  "restingHeartRate" : [
    {
      "date" : "2026-02-09",
      "unit" : "bpm",
      "value" : 63.100000000000001
    }
  ],
  "sleepTime" : [
    {
      "date" : "2026-02-08",
      "stages" : {
        "awake" : 14.5,
        "core" : 244.5,
        "deep" : 77.25,
        "rem" : 95.875,
        "unspecified" : 0
      },
      "unit" : "min",
      "value" : 417.625
    }
  ],
  "stepCount" : [
    {
      "date" : "2026-02-07",
      "unit" : "count",
      "value" : 8432
    },
    {
      "date" : "2026-02-08",
      "unit" : "count",
      "value" : 10250
    },
    {
      "date" : "2026-02-09",
      "unit" : "count",
      "value" : 6117
    }
  ],
  "vo2Max" : [

  ],
  "weight" : [
    {
      "date" : "2026-02-09",
      "unit" : "kg",
      "value" : 72.25
    }
  ]
}

The health export format reference specifies every key, and what may and may not change between versions of the app.

The data types #

There are 22 on every iOS the app supports, and a 23rd, RMSSD heart rate variability, on iOS 27 and later. Each type is exported as one value per day. Total is the sum of the day, average is the mean of the day’s readings, and latest is the last reading of the day. Units follow the measurement system in exportInfo.

Data typeJSON keyUnit (metric / US)Per day
Step CountstepCountcounttotal
Walking DistancewalkingDistancem / mitotal
Active CaloriesactiveCalorieskcaltotal
Basal CaloriesbasalCalorieskcaltotal
Exercise MinutesexerciseMinutesmintotal
Flights ClimbedflightsClimbedcounttotal
Resting Heart RaterestingHeartRatebpmaverage
Walking Heart RatewalkingHeartRatebpmaverage
Heart Rate VariabilityheartRateVariabilitymsaverage
Heart Rate Variability (RMSSD), iOS 27 and laterheartRateVariabilityRMSSDmsaverage
Oxygen SaturationoxygenSaturation%average
Respiratory RaterespiratoryRatebreaths/minaverage
Weightweightkg / lblatest
BMIbmicountlatest
Body FatbodyFat%latest
Lean Body MassleanBodyMasskg / lblatest
Dietary EnergydietaryEnergykcaltotal
ProteindietaryProteingtotal
CarbohydratesdietaryCarbohydratesgtotal
Total FatdietaryFatTotalgtotal
Sleep TimesleepTimemintotal of core, deep and REM
VO2 Maxvo2MaxmL/kg/minlatest
Wrist TemperaturewristTemperature°C / °Faverage

Heart rate variability comes as two measures that HealthKit keeps apart. heartRateVariability is SDNN, the one the app has always exported under that key. heartRateVariabilityRMSSD is RMSSD, which HealthKit has only on iOS 27 and later: on an earlier iOS the app does not list it and no export contains its key.

Workouts are a separate export with a file of their own, from the Workouts tab. The workout export format reference describes it, and the GPX guide covers their GPS routes. From version 1.8.0, on iOS 26 and later, so are the doses you logged for your medications, from the Medications tab, for the medications you choose to share with the app: the medications format reference describes that file.

Exporting on a schedule #

The same export is an action in the Shortcuts app, Export Health Data, with the same periods and data types, plus custom dates up to two years apart. The Shortcuts guide builds a shortcut that saves a fresh file to a folder in Files on a trigger you choose.

Where your data goes #

The file is created on your iPhone and goes only where you send it. Health Exporter sends no health data to any server. It does send anonymous usage statistics and error reports, which never contain health data, as the privacy policy describes.