Apple Health export to dashboard

From that giant XML archive to something you can read.

Apple Health exports as XML, so a CSV is something you or a converter produced from it. Drop that CSV here and the per-record structure is handled properly: overlapping samples from an iPhone and a Watch are deduplicated instead of double counted, units are read from the record rather than assumed from the column name, and state-based sleep records are collapsed into hours per night.

Prefer the full explorer? Open the app, or start from the generic dashboard builder.

Overlaps resolved
Samples from two devices covering the same minutes are counted once, not twice.
Per-record units respected
The unit lives in the row, so kilometers and counts never end up in one total.
Sleep states collapsed
State-based sleep records are turned into hours per night rather than left as intervals.
Nothing leaves the device
Health data is read in the browser tab. No upload, no account, nothing stored.

The export is XML, and the records overlap

Tap your profile picture in the Health app, choose Export All Health Data, and you get a zip containing an export.xml that can run to hundreds of megabytes. There is no CSV option. Whatever CSV you are holding came from a converter, a shortcut or a script, which means its column names are that tool's choice rather than Apple's. The good news is that the underlying record shape survives most conversions: a start date, an end date, a type, a source and a value.

That per-record shape is where the real difficulty lives. Health does not store a daily step total. It stores thousands of short samples, each covering a few minutes, each tagged with the device that produced it. If you carry an iPhone and wear a Watch, both are recording your steps, both write samples, and the intervals overlap. Sum them naively and you have walked twice as far as you did. Apple's own app resolves this by prioritizing one source per interval, and any honest CSV analysis has to do the same.

How to export from Apple Health

  1. Open the Health app on your iPhone Tap your profile picture at the top right, scroll to the bottom of that screen, and choose Export All Health Data. There is no equivalent on the Mac or the web.
  2. Wait for the archive to build This takes a while, sometimes several minutes on a phone with years of history, and the phone needs to stay awake. The result is a zip you share to Files, AirDrop or a cloud folder.
  3. Unzip and find export.xml Inside is export.xml, and often a second file for clinical records. The XML is one enormous document with a record element per sample, which no spreadsheet will open.
  4. Convert the XML to CSV Use a converter, a script or a shortcut to flatten the records you care about. Keep the start date, end date, type, source, value and unit fields, since all five matter for correct aggregation.
  5. Drop the CSV on this page Type becomes the first filter chip, source becomes the deduplication key, and daily totals are built from the record intervals rather than assumed.

Because the CSV comes from a converter rather than from Apple, column names vary between tools. Anything carrying a start date, a type, a value and a unit will load here; the header is read on arrival rather than assumed.

Try with sample Apple Health data (the same columns, 91 rows, no upload needed).

What the dashboard shows

Every panel below is built from a column that is actually in the export, named the way Apple Health names it.

  • Daily step count. Built by resolving overlapping samples first, so the total matches what the Health app shows rather than roughly doubling it.
  • Source contribution. iPhone against Watch against third-party apps, which immediately explains any day where the numbers looked impossible.
  • Active energy over time. Active energy burned in kilocalories, aggregated per day, with the unit taken from the record rather than guessed at.
  • Resting heart rate trend. One value per day, low frequency and slow moving, which makes it the most trustworthy long-run signal in the whole export.
  • Sleep hours per night. Sleep analysis records collapsed from state intervals into a nightly duration, with in-bed time separated from asleep time.
  • Walking and running distance. Distance in kilometers per day, cross-filtered by source so a treadmill app and the Watch do not both claim the same run.
Sample header row
startDate,endDate,type,sourceName,value,unit,stepCount,activeEnergyBurned (kcal),restingHeartRate (count/min),sleepAnalysis (hours),exerciseMinutes,distanceWalkingRunning (km)

Reading Apple Health data without double counting

  • There is no CSV export. Apple gives you XML only. Every Health CSV in existence was produced by some intermediate tool, which is why no two of them share a header layout.
  • Records overlap in time. Each sample has a start and an end, and samples from different sources cover the same minutes. Overlaps are the normal state of the data, not a corruption.
  • An iPhone and a Watch both count steps. Carry one and wear the other and every walk is recorded twice. Summing all step samples for a day can nearly double the real figure.
  • Units live in the record. Not in the header. One row can be in kilometers and another in miles depending on which app wrote it, so the unit column has to be read per row.
  • Sleep is state-based. Records say in bed, asleep, awake or a stage name for a window of time. A night is several records, and the duration must be summed by state rather than read off a single value.
  • The archive is enormous. Years of minute-level samples across a dozen metrics run to hundreds of megabytes of XML. Extract only the types you need before converting, or the CSV will be unusable too.

Health data is the messiest of the four sources here, because it is the only one aggregating several devices that were all trying to measure the same body at the same time. Resolve the overlaps, read the units per row, and the picture that emerges is the most complete of the lot.

Frequently asked questions

How do I get a CSV out of Apple Health?

You do not, directly. The Health app exports a zip containing export.xml and nothing else in tabular form. To get a CSV you run the XML through a converter, a shortcut or a small script that flattens the record elements. Keep the start date, end date, type, source, value and unit fields when you do, because dropping the source or the unit makes correct aggregation impossible later.

Why are my step counts roughly double?

Because both your iPhone and your Apple Watch recorded them. Health stores overlapping samples from every source and relies on the app to pick one per interval when it displays a total. A raw sum over the CSV counts the same minutes twice. Resolve overlaps by preferring one source per time window, usually the Watch when it was worn, which is what this page does before totaling.

Why is the unit in a column instead of the header?

Because a single type can be written by several apps using different units. One running app records distance in miles, another in kilometers, and Health stores each sample with the unit it arrived in. That is correct behavior for a store that accepts data from anywhere, and it means any analysis has to normalize per row rather than assuming the column is homogeneous.

How does sleep data work in the export?

It is state-based rather than a nightly total. Each record covers an interval and carries a state such as in bed, asleep, or a specific sleep stage on newer devices. A single night is a sequence of those records, so hours asleep means summing the duration of the asleep-state records between two waking points. In-bed time is a separate sum and is always longer.

The XML file is hundreds of megabytes. What do I do?

Filter before you convert. Most of the bulk is minute-level samples for a handful of high-frequency types, and you almost never need all of them. Extract only the types your question requires, such as step count, resting heart rate and sleep analysis, and the resulting CSV drops to a manageable size. Converting everything first and filtering later is the slow way around.

Is my health data safe here?

It never leaves your browser. The CSV is parsed in the tab and the dashboard is drawn from memory. Apple Health data is the most sensitive category of personal record most people hold, covering heart rate, sleep, weight and sometimes clinical entries, so uploading it to a web service to draw a chart would be a bad trade. There is no server behind this page to upload it to.

See health records aggregated the way Health does it

91 rows of per-record samples with overlapping iPhone and Watch intervals, units carried in the row, and sleep stored as states rather than as a nightly number.

Open the sample Apple Health dashboard