Spookwerk
English ▾
← Blog

How to export Apple Health data to CSV

Apple Health does not export to CSV. The built-in export gives you a single .zip containing one large XML file (export.xml) — not a spreadsheet. To actually get CSV, you have two options: convert that XML yourself with a script, or use an app that reads Apple Health and writes CSV directly, like Vitadatum. This guide covers both, honestly.

Where the export button is — and what it actually gives you

On your iPhone, open the Health app, tap Summary, tap your profile picture or initials in the top-right corner, scroll to the bottom, and tap Export All Health Data. After a minute or two it produces a .zip archive. Unzip it and you'll find export.xml — one big XML document holding your entire health history.

There is no "Export to CSV" button anywhere in Apple Health, and there never has been. XML is a format apps use to talk to each other; it is not a format Numbers, Excel, or Google Sheets will open into tidy rows, and it's not something you can comfortably hand to ChatGPT or Claude either. So you've got "your data" — technically true, practically stuck.

Route 1 — convert the XML yourself

If you're comfortable with a bit of code, you can flatten export.xml into CSV. Unzip the archive, then parse the XML (Python's built-in xml.etree.ElementTree works) and write the records out as rows. The structure is nested and the file can be enormous — years of minute-level heart-rate samples add up fast — so a naive script that loads the whole thing into memory will struggle. There are open-source converters that do this too.

It's a real option, and it's free. It's also genuinely fiddly: you're dealing with one giant file, inconsistent record types, and unit fields you have to decode yourself. Fine for a developer on a quiet afternoon. Rough for anyone who just wants their step count in a spreadsheet.

Route 2 — use an app that exports CSV directly

The other route is to skip the XML entirely and use an app that reads Apple Health and writes CSV for you. Vitadatum (which I make) does exactly that, on-device. It reads HealthKit and exports clean CSV and JSON — a summary CSV plus a detail CSV per metric, covering 187 metrics across 14 categories, including ECG. Open the CSV in Excel, Numbers, or Google Sheets; feed the JSON to ChatGPT or Claude.

It runs entirely on your phone: no account, no backend, no cloud upload. Your health data never leaves the device unless you choose to share a file — which is a meaningful difference from tools that upload everything to a server to do the conversion.

It's free for the last 7 days, so you can see the exact output before paying anything, and a €4.99 one-time unlock (no subscription) gets you full history, CSV export, and automatic background exports. You can find it on the App Store.

Which route should you pick?

If you write code and you only need the data once, convert the XML yourself — it costs nothing but an afternoon. If you'd rather not parse a multi-gigabyte XML file by hand, or you want exports that stay current without you thinking about them, an app that writes CSV directly is the cleaner path. Either way, the goal is the same: your data, out of the phone, in a format you can actually use.

FAQ

Can Apple Health export to CSV directly?

No. The built-in Export All Health Data feature produces a .zip containing XML (export.xml), not CSV. To get CSV you either convert the XML yourself or use an app like Vitadatum that exports CSV directly.

Where is the Apple Health export button?

Open the Health app, tap Summary, tap your profile picture or initials in the top-right corner, scroll to the bottom, and tap Export All Health Data.

What format is the Apple Health export?

A .zip archive containing a large XML file (export.xml) with your full health history. No spreadsheet opens it into clean rows.

How do I open the exported file in Excel or Numbers?

You can't open export.xml as a spreadsheet directly — XML isn't tabular. Convert it to CSV first (with a script), or use an app like Vitadatum that exports CSV you can open straight in Excel, Numbers, or Google Sheets.

Does Vitadatum upload my health data?

No. Vitadatum runs entirely on your device — no account, no server, no cloud upload. Your data only leaves your phone if you choose to share an exported file.

— O, Spookwerk