To export your HRV and sleep data from Apple Health, use HealthSave to select those metrics, pick a date range, and export to CSV or JSON — no XML wrangling. This guide covers the exact export steps, plus the part most pages skip: what HRV and sleep actually are inside Apple Health, so your spreadsheet makes sense.
I'm Umut, the developer. I separate the two things below on purpose: the product steps (what HealthSave does) and the educational facts (what Apple's data means, cited to Apple's own developer documentation).
The export, step by step
- Install HealthSave (free) and grant read access to Apple Health. It's read-only — it never writes to your records.
- Select two metrics: Heart Rate Variability (HRV) and Sleep. HealthSave reads 30+ HealthKit types, so you can add resting HR or respiratory rate alongside if you want recovery context.
- Choose a date range. A 90-day window is a good span for spotting recovery trends. (Note: the on-screen 30/90-day trend charts are a Pro feature; exporting the raw data over a range to CSV/JSON is what we're doing here.)
- Export as CSV (for Sheets/Excel) or JSON (for scripts). Both are free.
- Share via the iOS share sheet to Files, Drive, iCloud, or email.
That's the product part. Now the data itself.
What HRV is in Apple Health (educational)
Apple Health stores heart rate variability under the data type HKQuantityTypeIdentifierHeartRateVariabilitySDNN. Two things follow from that identifier:
- It's SDNN — the standard deviation of NN (beat-to-beat) intervals — not RMSSD or another HRV measure. If you compare it to a number from Whoop or another app that reports RMSSD, they won't match, because they're different calculations.
- It's measured in milliseconds (ms). (Apple Developer documentation,
HKQuantityTypeIdentifierHeartRateVariabilitySDNN.)
So in your CSV, the HRV value column is SDNN in ms. Higher generally tracks with more variability; the absolute number is most useful compared against your own baseline, not against other people or other apps' HRV figures.
What sleep is in Apple Health (educational)
Sleep is not a single nightly number in HealthKit. It's stored as a category type, HKCategoryTypeIdentifierSleepAnalysis, recorded as segments with start and end times and a value indicating the state — including in bed, asleep core, asleep deep, asleep REM, and awake. (Apple Developer documentation, HKCategoryValueSleepAnalysis.)
That's why a sleep export looks like a series of stage rows per night rather than one "hours slept" figure: each row is a stage segment. To get total sleep or deep-sleep minutes for a night, you sum the relevant segments. HealthSave exports the segments as recorded; how you aggregate them is up to you.
Worked example: a 90-day recovery sheet
Select HRV + Sleep, set the range to 90 days, export CSV. You'll get an HRV table (timestamp, SDNN in ms) and sleep rows (segment start, end, stage). In Sheets, sum each night's asleep segments for total sleep, pull the daily HRV, and you can chart HRV against sleep over the quarter — a genuinely useful recovery view built from your own data.
A caveat that matters: the number is your wearable's
Where your HRV and sleep come from depends entirely on the device that wrote them to Apple Health. HealthSave works with any wearable that syncs to Apple Health — Apple Watch, Whoop, Samsung, Garmin, Fitbit, Amazfit, Huawei — and different devices measure and stage sleep differently, and compute HRV at different times (Apple Watch typically logs SDNN during specific moments, not continuously). HealthSave displays and exports what your wearable recorded, as-is. It does not validate sensor accuracy. If two devices disagree, that's a device question, not an export bug.
Honest limits
- iOS only, reads Apple Health; the data must already be in HealthKit.
- Read-only — it can't edit or backfill missing readings.
- Free vs Pro: CSV/JSON export is free; the free tier caps export history at 7 days, so a full 90-day single export needs Pro ($24.99 one-time). The 30/90-day on-screen trend charts are also Pro.
- Accuracy depends on your wearable, as above — HealthSave doesn't normalize across devices.
HealthSave is not a medical device. It is for informational purposes only and does not diagnose, treat, cure, or prevent any disease or condition. The accuracy of health data depends on your wearable device and its sensors; HealthSave displays wearable data as-is.
Related
- Apple Health's export is unusable XML — get real CSV.
- Bring a clean health trend to your doctor (PDF).
- Apple Health data for self-hosters — pipe HRV/sleep into Grafana.
Get HealthSave
Free to download, no account. Export HRV and sleep to CSV/JSON in a couple of taps.
Download HealthSave on the App Store
By Umut — developer of HealthSave. I built HealthSave because I wanted my own Apple Health data out of its silo and into my homelab. I use it every day.