export.zip read on this computer

Apple Health Export Analyzer

Open the export.zip from the Health app and see steps, heart rate, sleep and workouts over time, with source de-duplication and daily, weekly or monthly totals. The file is streamed, so exports of several gigabytes do not have to fit in memory.

Your export is read by your browser in this tab and nowhere else. This page has no server side: the file is never sent over the network, and the page makes no request that carries any of its contents. The numbers are summaries of what the file records. They are not medical advice and the page does not judge whether any value is healthy.

1. Open the export

Choose export.zip (or export.xml)

Up to 6 GiB; at most 8 GiB of XML is read

In the Health app on the iPhone, tap your profile picture, then Export All Health Data. The zip holds export.xml, workout routes as GPX files and electrocardiograms as CSV files. The example is invented data from two made-up devices.

Apple Health Export Analyzer

Operator: Abdulla Al Fahad. How tools are built and checked

An Apple Health export is one XML file that can pass several gigabytes after a few years of Apple Watch wear, wrapped in a zip that also holds workout routes and electrocardiograms. Text editors choke on it, and a spreadsheet cannot hold the millions of records it describes. The numbers inside are still yours, and they answer ordinary questions: how many steps a day, how the resting heart rate moved, how long you slept.

This page reads export.xml as a stream and keeps only small daily summaries, so the file never has to fit in memory. Steps recorded by a watch and a phone at the same time are counted once. Nothing here is medical advice, and the page does not say whether a value is healthy.

Key features

  • Opens export.zip (up to 6 GiB) or a bare export.xml and reads at most 8 GiB of XML, with a progress bar and a Cancel button
  • Counts every Record by type, matching a text search for the same type, and lists sources with their record counts
  • Daily, weekly (Monday start) and monthly charts for any quantity type, with the daily rule chosen per type: total, average, lowest, highest or last reading
  • Source de-duplication for steps, walking and running distance, cycling distance, active energy, flights climbed, exercise time and stand time, with a source priority you can reorder
  • Sleep per night: asleep, in bed, core, deep, REM and awake minutes, bedtime and wake time, and their spread across nights
  • Workouts with duration, distance, energy and heart rate, their GPX routes drawn without a map, and ECG traces from the electrocardiogram CSV files
  • Exports: a tidy daily CSV, every record of chosen types as CSV, workouts CSV, all route files as a zip, and a PDF summary

What export.xml contains and how this page turns it into daily numbers

export.xml starts with a DOCTYPE that declares the document's elements, then an ExportDate, a Me element and a long run of Record elements. Each Record carries a type such as HKQuantityTypeIdentifierStepCount, a unit, a sourceName, optional device and version, and start, end and creation dates written like 2024-03-05 07:12:33 +0100. Workout elements hold child statistics, events and a route reference, ActivitySummary elements hold the ring totals, and Correlation elements, blood pressure for instance, contain Records that also appear on their own.

Sleep is a category type whose value names a stage. Since iOS 16 a watch writes asleep core, deep and REM stages and an awake stage; older records and phone-only tracking give a single asleep value or time in bed. The page reads all of them, and labels a night with the evening it began.

The zip holds the workout routes as GPX files in a workout-routes folder and each electrocardiogram as a CSV file in an electrocardiograms folder, with header lines for the recording and then one voltage per line. The attribute and folder names here follow the files Health writes, as read by this page; Apple does not publish a schema, and later iOS versions may add types, which appear as extra rows in the overview.

How it works

The zip is opened through its central directory and export.xml is inflated chunk by chunk into a streaming UTF-8 decoder and the saxes XML parser. Every byte is counted as it comes out, so a file that inflates past 8 GiB stops the read instead of exhausting memory. Internal DTD declarations are reported by the parser and ignored; elements are never expanded.

Quantity records that measure an interval, such as steps, are spread over 15-minute slots of the day in proportion to the time they cover. For each slot the page takes the value from the highest-priority source that recorded anything in it. Other cumulative types, such as dietary energy, take the day's total from the one source with the largest total. Everything else, heart rate or weight for instance, keeps a count, sum, lowest, highest and last reading per day.

For sleep, every segment goes into its night and source. Overlapping segments of the same stage are merged so no minute is counted twice, the night uses the source that recorded the most sleep, and time in bed is the longest any source recorded. Spread of bedtime and wake time is the sample standard deviation across nights. The all-records CSV needs a second pass, because records are not kept in memory: it reads the file again and writes only the chosen types, up to 3,000,000 rows, leaving out records nested inside Correlation elements.

When this helps

  • Someone who bought a watch in 2019 exports once and charts monthly resting heart rate for five years, without opening the Health app on the phone.
  • A runner wants every route as a GPX file to load into a mapping program; one click writes all of them to a zip.
  • A person comparing two watches worn together moves the older one up in priority and sees how much the daily step total changes.
  • A research student loads a volunteer's export to pull the tidy daily CSV of sleep minutes and steps into a statistics package.
  • A user whose export is 4.8 GiB opens it, cancels at 40 percent to check the progress readout, and starts again knowing roughly how long the full read takes.

Opening a file

  1. Choose export.zip, or press Load example to see the page on made-up data, and wait for the progress bar to finish.
  2. In Trends, pick a type, a period and the rule for a day. In Overview, move a source up or down if the default priority puts the wrong device first.
  3. Open Sleep and Workouts, then Export for the daily CSV, the PDF summary and the route files.

Example

Load example: a 21-day export from an invented watch and phone, 377,308 bytes of XML in a zip

Steps from the watch between 08:00 and 20:00 and from the phone before 09:00 and after 18:00, so the two overlap; seven heart rate readings a day; one sleep record set per night; three runs

What the page shows

1,664 Records of 8 types, 2 of them inside a Correlation; counts equal a text search of the XML
Steps on 2024-03-01: 2,877 (watch first); adding both sources would give 3,423
Weekly steps from Monday 26 Feb: 9,626 (3 days), 22,132, 21,323, 12,452 (4 days); 65,533 in all
First night: asleep 6 h 53 min (core 204, deep 51, REM 158 min), awake 51 min, 22:43 to 06:27
21 nights: mean asleep 6 h 49 min, bedtime spread 17.5 min, wake spread 11.3 min, deep 12.4% and REM 38.1% of staged sleep
First run: 5.2 km in 32 min, average heart rate 152; its route has 121 points and 1.887 km

Tips for best results

  • Choose sum for steps and energy, average for heart rate and HRV, and lowest for resting heart rate if you care about the best day of a week.
  • A weekly average is weighted by the number of readings, so a week with one watch-off day is not pulled toward that day.
  • Export only the types you need to CSV; the all-records file for steps alone can run to millions of rows.

Limits

Apple does not publish how the Health app merges sources, and this page merges by 15-minute slots. Daily totals can therefore differ from the Health app by some steps; the app's own figure remains the one Apple reports.

Days follow the clock time written on each record, so a flight across time zones moves records to the local day they were made in, not the day in your home zone.

Heart rate is kept as daily summaries, so there are no per-workout heart rate zones or splits; a workout shows only the average, lowest and highest the export gives.

Common errors and how to fix them

This .zip has no export.xml inside.
Choose the export.zip made by Export All Health Data, not a zip you made yourself of other files. Some exports nest the folder, which is fine; the file must be named export.xml.
export.xml is not well-formed XML.
The file was cut short or damaged, often a partly finished download or AirDrop. Export again and compare the size on both devices.

Best practices

  • Keep the zip you analysed; the daily CSV is a summary and cannot give back the original records.
  • Check the source list first. A phone, a watch and a third-party app can all write the same type, and the priority decides whose steps count.
  • Read the sleep table beside the chart: a night with a low total and a very late wake time is often two sources disagreeing, not short sleep.
  • Export the PDF summary after fixing the priority, since it uses the order on screen.

What the sleep numbers mean

Asleep is the union of core, deep, REM and unspecified asleep time, so overlapping records do not add up to more than the night. In bed is separate and normally longer. Awake time inside the night is shown but not subtracted a second time from asleep, because the stages already exclude it.

Why routes are drawn without a map

A map background would mean asking a tile server for the area around every route, which tells that server where you run. The route is drawn as a line with north up and the start marked, and the GPX file can go to a mapping program of your choice.

Frequently asked questions

Does anything leave my browser?

No. The file is read by the page's own code in this tab, the zip is never uploaded, and the page requests nothing that contains any of its contents. Charts, maps and exports are all produced locally, and the example is generated in the page.

Why are the counts different from the Health app's totals?

The app shows merged, de-duplicated values and applies its own source rules. The counts here are Record elements in the file, the same number a text search finds, while daily values use the slot-based merge described above.

What if my export is larger than 8 GiB of XML?

Reading stops with a message. Export a shorter period if the Health app offers it, or split the file by date with a text tool and open the parts.

Why does the ECG trace not come with a verdict?

The watch writes a classification into the file, and the page prints it. Reading the trace itself is not something this page does, and a drawing of a waveform is not a diagnosis.

Are my name and birth date read?

The Me element and the name and date of birth lines in an ECG file are skipped and never shown or exported.