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 #
- 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.
- 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.
- 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.
- 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
}
]
}exportInfodescribes the export: the range you asked for (startDateandendDate), when it ran (exportDate), the data types it holds, the app version and build, andmeasurementSystem, which ismetricorusdepending on your iPhone’s region settings and decides the units.- Every data type you selected gets a key of its own, holding one entry per day, oldest first. A day with no data has no entry, and a type with no data in the whole range is an empty array, like
vo2Maxabove. - An entry is a
date(YYYY-MM-DD, in your local calendar), avalueand itsunit. Sleep entries addstages, the minutes spent in each stage. Theirvalueis core plus deep plus REM sleep, so time awake is not counted in it, and a night’s sleep is filed under the day you woke up. - Values are not rounded.
63.100000000000001is how the encoder writes the number 63.1, and any JSON parser reads it back as 63.1. - Keys are sorted alphabetically and the file is indented, so the same data always comes out in the same layout.
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 type | JSON key | Unit (metric / US) | Per day |
|---|---|---|---|
| Step Count | stepCount | count | total |
| Walking Distance | walkingDistance | m / mi | total |
| Active Calories | activeCalories | kcal | total |
| Basal Calories | basalCalories | kcal | total |
| Exercise Minutes | exerciseMinutes | min | total |
| Flights Climbed | flightsClimbed | count | total |
| Resting Heart Rate | restingHeartRate | bpm | average |
| Walking Heart Rate | walkingHeartRate | bpm | average |
| Heart Rate Variability | heartRateVariability | ms | average |
| Heart Rate Variability (RMSSD), iOS 27 and later | heartRateVariabilityRMSSD | ms | average |
| Oxygen Saturation | oxygenSaturation | % | average |
| Respiratory Rate | respiratoryRate | breaths/min | average |
| Weight | weight | kg / lb | latest |
| BMI | bmi | count | latest |
| Body Fat | bodyFat | % | latest |
| Lean Body Mass | leanBodyMass | kg / lb | latest |
| Dietary Energy | dietaryEnergy | kcal | total |
| Protein | dietaryProtein | g | total |
| Carbohydrates | dietaryCarbohydrates | g | total |
| Total Fat | dietaryFatTotal | g | total |
| Sleep Time | sleepTime | min | total of core, deep and REM |
| VO2 Max | vo2Max | mL/kg/min | latest |
| Wrist Temperature | wristTemperature | °C / °F | average |
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.