Explainer
Apple Health Export XML: Format, File Size, and Why AI Tools Can't Read It
Apple Health gives you a button to export every health record on your iPhone. What you get is a .zip containing an undocumented XML file that's typically 200-500MB. Here's what's actually inside, why ChatGPT and Claude can't parse it, and the format that does work.
TL;DR
- Format: a .zip containing
export.xml,export_cda.xml, plus optional ECG and workout-route folders. - Typical size: 200-500MB unzipped (50-150MB as a .zip). Heavy users hit 1GB+.
- Why AI tools choke on it: too large for any context window, schema is undocumented, and most of the bytes are metadata, not data.
- The fix: convert to per-metric CSV files with daily summaries — token-efficient, schema-clean, AI-ready.
What format does Apple Health export?
When you tap your profile picture in the Health app, scroll to the bottom, and choose "Export All Health Data", the iPhone packages everything into a single export.zip file. Inside that zip:
export.xml
The main file. Every heart rate reading, every step count, every sleep stage, every workout, every nutrition log — serialized as XML records. Usually 95%+ of the .zip's size.
export_cda.xml
Clinical Document Architecture format — FHIR-style records pulled in from connected health providers (lab results, immunizations, medications). Empty for most consumers, populated if your hospital's patient portal is linked.
workout-routes/
GPX files — one per outdoor workout — with GPS, elevation, and pace data. Only present if you do outdoor workouts with the Apple Watch.
electrocardiograms/
One CSV per ECG reading from Apple Watch Series 4 and later. Each file has 30 seconds of high-resolution heart-rhythm data.
Apple does not publish a schema document for any of these files. Format details are inferred from the data itself, and Apple has changed the structure between iOS versions without notice.
Typical Apple Health export file size
Size scales with how long you've had an iPhone, whether you wear an Apple Watch, and how many third-party health apps have written to HealthKit. Rough ranges based on real exports:
1 year, light use (no Watch)
30-80MB
Steps, distance, occasional manual workouts. Mostly auto-tracked iPhone metrics.
5 years, Apple Watch daily wear
200-500MB
The most common case. Heart rate every few minutes for years, hundreds of workouts, sleep tracking, HRV, blood oxygen.
10+ years, multi-app biohacker
800MB-1.5GB
Apple Watch since launch, MyFitnessPal nutrition, Oura sleep, Whoop strain, Eight Sleep, MFP, Strava, Peloton — all writing to HealthKit. The XML grows fast.
The .zip compresses to roughly 30-40% of unzipped size. A 500MB unzipped export usually arrives as a 150-200MB .zip when you AirDrop or email it.
What's inside export.xml
One XML root element wraps everything: <HealthData>. Inside it, the four element types you'll see most:
<Record>
One per data point. The vast majority of the file. Examples: every heart rate reading, every step count, every sleep stage, every blood pressure entry.
<Record type="HKQuantityTypeIdentifierHeartRate"
sourceName="Apple Watch"
unit="count/min"
startDate="2026-05-01 09:14:23 -0700"
endDate="2026-05-01 09:14:23 -0700"
value="61"/><Workout>
Each gym session, run, or activity logged via Apple Watch or third-party apps. Includes activity type, duration, energy burned, distance, and references to per-second metrics during the workout.
<Correlation>
Apple's pre-grouped readings — for example, food entries grouping calories, protein, fat, and carbs as one logical event. Less common than Record entries.
<ClinicalRecord>
FHIR-formatted clinical data from connected health systems (Epic MyChart, Cerner, etc.). References external resources for the actual content. Rare unless your hospital is connected.
Each <Record> attribute is metadata: source device, source app version, hardware identifier, time zone, unit string. For a single heart rate reading like value="61", the surrounding XML markup is roughly 200 bytes — meaning a million heart rate samples cost you 200MB of mostly redundant metadata.
Why this XML doesn't work with AI tools
People type "export apple health to chatgpt" into Google because the obvious move — drag the export into ChatGPT and ask questions — doesn't work. Four reasons why:
Token limits
A 200MB XML file is roughly 50-100 million tokens. ChatGPT Plus tops out at 128k. Claude tops out at 200k. Gemini 1.5 Pro at 2 million still can't fit a heavy export. The file is rejected at upload, or ChatGPT silently truncates and answers from the first few minutes of data.
Undocumented schema
There's no header, no field documentation, no "here's what HKQuantityTypeIdentifier means" cheat sheet inside the file. The model has to infer thatHKQuantityTypeIdentifierBodyMassIndexis BMI. Fine for common metrics, unreliable for the long tail.
Mixed record types in one stream
A heart rate Record looks structurally identical to a sleep stage Record. AI tools have to distinguish them by thetypeattribute, which they sometimes get wrong on borderline cases likeRestingHeartRatevsHeartRate.
Verbose markup wastes context
Even when a small slice fits in context, every Record carries its full attribute list — source name, device, time zone, unit — repeated millions of times. The signal-to-noise ratio is brutal. AI ends up reasoning about XML attributes instead of about your health.
The format that actually works: CSV per metric
CSV solves all four problems. Each metric becomes its own file with a header row, one entry per timestamp, unit baked into the column name. A year of daily resting heart rate is roughly 6KB. Steps, sleep, HRV — all of it — fits comfortably in a single AI context window.
Apple's native XML
- 200-500MB+ per export
- Undocumented schema
- Verbose, redundant metadata
- Won't fit any AI context window
AI Health Export CSV
- One CSV per metric, daily summaries
- Schema-clean header row, units explicit
- Filtered to what AI tools can actually use
- 365 days of data fits in any chat context
Same data, different shape. The XML still exists if you want it for archival — but for asking ChatGPT, Claude, or Gemini real questions about your health trends, the CSV is the format that meets the AI where it lives.
Frequently asked questions
What format does Apple Health use to export data?
A .zip archive containing export.xml (main records), export_cda.xml (clinical data), and an optional electrocardiograms folder. The XML is HealthKit's native serialization format.
How big is the Apple Health export file?
Typically 200-500MB unzipped for 5-10 years of data. The .zip is usually 50-150MB. Heavy users can exceed 1GB. Even one year of light usage produces a 30-80MB export.
Can I open Apple Health export.xml in ChatGPT?
Not directly. A 200MB XML file is roughly 50-100M tokens — far beyond ChatGPT (128k), Claude (200k), or Gemini 1.5 Pro (2M) context limits. The file must be filtered or converted to CSV first.
What is the structure of export.xml?
A single <HealthData> root with thousands to millions of Record elements (one per data point), Workout elements, Correlation elements, and ClinicalRecord elements. Each Record has type, sourceName, unit, startDate, endDate, and value attributes.
Does Apple document the export.xml schema?
No. There's no formal schema document. HealthKit type identifiers are documented in Apple's developer reference, but the export format itself is undocumented and has shifted between iOS versions.
What's in the .zip besides export.xml?
export_cda.xml for FHIR-style clinical data, a workout-routes/ folder with GPX files for outdoor workouts, and an electrocardiograms/ folder with one CSV per ECG reading.
Skip the XML. Get the CSV.
AI Health Export converts your Apple Health data into per-metric CSV files on your iPhone — no computer needed. Free tier covers 7 days of data and 20 metrics.