You've opened Apple Health, found years of heart-rate readings, workouts, sleep records, and clinical data, and now a doctor or app wants the file. You tap Export All Health Data, wait for the archive, and discover that the result isn't a neat spreadsheet. It's a large ZIP containing raw XML, designed for completeness rather than convenience.
That's the Apple Health data export problem. Getting the archive is easy. Turning it into a focused, readable, privacy-conscious report takes more judgment. Apple's built-in workflow gives you the full record, but you'll need a conversion or reporting step before most clinicians, spreadsheets, and analysis apps can use it efficiently.
What the Built-In Apple Health Export Actually Produces
Apple's export is a full-fidelity data dump, not a report builder. Open the Health app on your iPhone, tap your profile icon, scroll down, select Export All Health Data, confirm with Export, and choose where to send the archive. Depending on your workflow, you can save it to Files, send it by Mail, or transfer it through AirDrop.
Apple explains that the process may take some time before the share sheet appears in its official Health data sharing instructions. Don't start the export while you're rushing into an appointment. Keep the phone powered, leave the Health app alone, and give the device time to package the records.

What's inside the ZIP
The archive typically contains:
export.xml, the raw HealthKit record file. It can include heart rate, steps, workouts, sleep, body measurements, symptoms, medications, and clinical records, depending on what your devices and apps have written to Health.- A PDF summary, which gives you a more readable overview of selected health information.
- Supporting files, depending on the data types present in your Health database.
Apple's community documentation and user discussions describe the XML file as the central raw export and note that long histories can produce very large files or take significant time to process. The Apple Support Community discussion about export size and timing is useful because it reflects the practical problem Apple's polished instructions don't emphasize.
Why the XML feels unusable
The file is structured for software, not for a human reader. Each record carries attributes such as its type, source, unit, value, and timestamps, often alongside metadata entries. Opening it in a normal text editor shows a dense stream of tags rather than a table a cardiologist can scan.
Practical rule: Treat the ZIP as your backup master. Create a filtered working copy before you upload, email, or share anything.
The built-in export is still the right starting point when you need a complete archive. It preserves breadth and gives you a portable copy of your Health data. Just don't mistake that archive for a finished clinical report.
Selective Exports and Why Apple Does Not Offer One
You open Health with a focused request from a clinician: heart-rate trends, sleep, and blood pressure from a specific period. Apple's export screen cannot produce that package. The built-in workflow creates one XML archive containing the available Health and fitness data, without a date-range selector or category picker. Apple's documentation supports this full-export approach, while the Health data export tool listing shows why people still seek separate filtering and conversion options.
Apple's choice follows HealthKit's role as a central store for device readings, app imports, and manual entries. A partial file can lose context if it excludes gaps, older measurements, or records from another source. The complete archive preserves that context, then puts the selection work on you.
That trade-off becomes inconvenient as soon as the recipient needs one question answered. A clinician might need heart-rate trends alongside symptoms. A researcher might need one metric over a defined period. Sending the full archive adds review work and exposes more personal information than necessary.
Compare the practical workarounds
| Method | Filtering Control | Privacy Risk | Skill Level |
|---|---|---|---|
| Dedicated export app | Often supports metric and date selection | Read access goes to another developer | Low |
| Shortcut workflow | Can query selected HealthKit samples | Permissions still expose the chosen data | Medium |
| Manual pruning | Full control after export | Raw file may pass through cloud or shared storage | Medium |
| Local script | Precise filtering and repeatable rules | Lowest upload exposure when run locally | Advanced |
Use Apple's full archive as the backup master, then make a filtered working copy for analysis or clinical sharing. That split keeps the original intact while giving the recipient a manageable file.
If an app handles the filtering, review its Health permissions before granting access. A selective export improves privacy only when the filtering process does not receive more data than the task requires. For recurring requests, a local workflow is the stronger choice because it keeps the raw archive under your control and applies the same selection rules each time.
Converting the XML to CSV or JSON You Can Use
You have three sensible conversion paths. Choose based on whether you value no uploads, repeatability, or speed.
Path one, convert on the iPhone
A Shortcut can read the exported XML, parse the relevant record elements, select fields, and save a CSV or JSON file. Keep the workflow narrow. Pull the record type, unit, value, source, start date, and end date first. Add metadata only when it helps interpret the measurement.
A local Shortcut is useful when you want to avoid sending the raw archive to a web service. It also gives you a repeatable handoff for a recurring appointment workflow. The limitation is that building a reliable XML parser inside Shortcuts takes patience, particularly when records contain optional attributes or nested metadata.
Path two, use a local Python script
For control, use a local script. This example reads export.xml, extracts common record attributes, and writes a flat CSV without uploading the file anywhere:
import csv
import xml.etree.ElementTree as ET
tree = ET.parse("export.xml")
root = tree.getroot()
fields = [
"type",
"sourceName",
"sourceVersion",
"unit",
"value",
"startDate",
"endDate",
"device",
]
with open("health_records.csv", "w", newline="", encoding="utf-8") as output:
writer = csv.DictWriter(output, fieldnames=fields)
writer.writeheader()
for record in root.findall("Record"):
writer.writerow({field: record.attrib.get(field, "") for field in fields})

This produces a broad CSV, not a polished medical report. Filter the output afterward by record type, source, and date. Keep the original XML untouched so you can rerun the process if your filtering rules change.
Handle dates before trusting the output
Apple stores timestamps as ISO 8601 strings, commonly with timezone information. A parser that ignores offsets can shift samples into the wrong local hour. That matters for sleep, symptoms, workouts, and any analysis involving posture or time of day.
Use timezone-aware date parsing, preserve the original timestamp, and create a separate local-time column for human review. Never overwrite the source timestamp during conversion.
Path three, use a converter or importer
A third-party converter can save time by turning the XML into CSV or JSON during import. Some services also let you select metrics and date ranges before creating the final file. The convenience comes with a privacy trade-off, because the raw export may leave your device.
My preference is to convert locally whenever the file contains sensitive clinical, reproductive, medication, or route data. Use an external importer only after checking its storage policy, permissions, deletion controls, and export behavior.
Using Shortcuts and Third-Party Tools for Faster Workflows
Automation helps most with the handoff, not with shrinking Apple's native archive. A Shortcut can create a repeatable sequence that starts the Health export, saves the resulting file to a chosen Files or iCloud Drive folder, creates an archive when needed, and opens the share sheet for an approved destination.
Build it around the task you repeat:
- Start with the Health export action. Keep the output in a temporary folder rather than your general documents directory.
- Add a Save File step. Use a clearly named folder such as “Health exports pending review.”
- Route the archive deliberately. Send it to Files, AirDrop, or a trusted import screen only after checking the recipient.
- Add cleanup. Delete temporary copies after you've created the filtered report.
Shortcuts won't turn Apple's native full export into a date-filtered query before the archive is created. The time saving comes from reducing taps and preventing misplaced files.
Pick tools by workflow, not by feature count
A category-focused exporter suits someone who needs a small set of metrics for a defined period. A scheduled exporter suits someone who wants recurring CSV or JSON files delivered to a private storage location. A charting app suits someone preparing for an appointment and needing a visual preview before deciding what to share.
| Tool | Export Format | Filtering Capability | Automation | Best For |
|---|---|---|---|---|
| Category-focused exporter | CSV or JSON | Metric and date filters | Manual or repeatable | Power users |
| Scheduled data exporter | CSV or JSON | Configurable selections | Scheduled delivery | Ongoing personal analysis |
| Heart-rate analysis app | Charts and PDF reports | Focused heart metrics | Automatic analysis | Appointment preparation |
| Custom Shortcut | CSV, JSON, or ZIP | Depends on the actions | One-tap handoff | Repeat sharing |
Cardiogram analyzes heart-rate data from Apple Health with read-only HealthKit access, processes analysis on the device, and can create structured episode views and clinician-oriented reports. For a clinician workflow, that can be more useful than handing over an untouched XML archive, particularly when the question concerns heart-rate patterns rather than the entire Health database.
Review permissions after testing. In Settings > Health > Data Access & Devices, remove access that you no longer need, especially write permissions. Read-only access is the better default for an analysis tool.
Sharing Apple Health Data With Your Clinician
A raw export.xml file is rarely the right document for a short appointment. Give your clinician a compact report first, then keep the full archive available if they ask for source records.
Start with the complete export, create a filtered working file, and isolate only the measurements relevant to the consultation. For a heart-related discussion, that might include heart rate, resting heart rate, HRV, blood pressure, weight, sleep, symptoms, and notes about medication or activity. The exact selection should follow the clinical question, not whatever data happens to be easiest to export.
Build a cover sheet
A one-page cover sheet makes the file easier to trust and interpret. Include:
- Date range: State the period represented by the report.
- Data sources: List the devices and apps that contributed records.
- Known gaps: Mention periods when the watch wasn't worn, syncing stopped, or a device changed.
- Context: Note relevant symptoms, medication changes, illness, travel, or unusual exercise.
- File guide: Explain which attachment is the summary and which is the raw backup.
A clinician can interpret a focused report faster than a massive archive with no explanation. Don't bury the question you want answered under every record Apple has collected.
Choose the sharing channel carefully
For an in-person visit, AirDrop or a direct wired transfer avoids sending the file through ordinary email. For remote care, use the clinic's patient portal when it accepts attachments. Encrypted email can work when both sides understand the arrangement, but don't assume ordinary email provides meaningful protection for a sensitive ZIP.
If you're preparing a heart-rate report, review Cardiogram's report customization guide before exporting. A date-focused PDF or CSV can give the appointment a usable starting point while preserving the full archive separately.
Send the smallest useful file first. Keep the complete export as your source copy, not your default attachment.
Before sharing, open the final CSV or PDF yourself. Check that the dates make sense, values have units, the selected period is correct, and the report doesn't include unrelated records. Data that looks impressive but lacks context usually creates more questions than answers.
Privacy Best Practices Before You Hand Over Any File
An Apple Health export can reveal far more than heart rate. Workout routes may expose places you live or visit. Medication, reproductive health, mental health, symptom, and clinical records can sit beside routine activity data. Treat the archive like a highly sensitive personal document, not like a disposable fitness file.
Use this checklist before you share:
- Confirm the minimum necessary scope. Ask whether the recipient needs the full archive or only a filtered report.
- Prefer local processing. A converter that runs on your Mac or iPhone avoids uploading the raw XML to a remote server.
- Inspect permissions. Favor read-only HealthKit access for analysis. Revoke access in Settings > Health > Data Access & Devices when the task is complete.
- Choose a safer transfer method. Use AirDrop, a wired transfer, or a patient portal where practical.
- Protect unavoidable email attachments. Password-protect the archive and send the password through a separate channel.
- Clean up copies. Delete the unzipped XML from shared computers, cloud folders, downloads, and temporary directories after the appointment.
Removing an app's permission doesn't erase copies it already synchronized elsewhere. Check the service's deletion controls directly if you used a remote converter or backup destination. Cardiogram's health-data privacy guidance is relevant when you're evaluating an app that analyzes Apple Health records.
The safest workflow keeps the raw export local, creates a narrow report, and shares only that report. Maintain one protected master archive so you don't need to repeat the full export every time someone asks for a single trend.
Troubleshooting Common Export Problems
Most Apple Health export failures fall into a few predictable categories. Start with the device, then storage, then the parser.
Diagnose the failure in order
- The export appears stuck: Turn off Low Power Mode, make sure an iCloud backup isn't actively locking resources, plug in the iPhone, and keep it awake while Health compiles the archive.
- The archive is too large or the process fails: Free substantial local storage before retrying. A long history needs room for the temporary archive as well as the final ZIP, so don't attempt the operation with almost no available space.
- The dates look wrong: Open
export.xmland inspect the first record timestamp. If values show an unexpected epoch or jump between local times, your converter may be discarding timezone offsets. - The CSV collapses records together: Check whether the parser preserves attributes such as
sourceVersionanddevice. A weak parser may flatten distinct record types into an unhelpful generic column. - The clinician report seems incomplete: Filter and row-check the resulting file before sending it. Confirm that the selected heart-rate and step records survived conversion, and compare the output with the Health app's visible summaries.
Match the method to the goal
For a backup, keep Apple's untouched ZIP. For analysis, convert it locally and preserve timezone information. For a doctor's visit, create a focused PDF or CSV with a cover sheet and known gaps. For questions about false alerts or noisy heart-rate patterns, review false-positive reduction guidance before interpreting isolated readings.
The main decision is not whether to export. It's what you need the export to do. Apple gives you the complete source record, and your next step should turn that raw archive into a smaller, understandable file without surrendering more privacy than the task requires.
Cardiogram turns Apple Health heart-rate data into structured episodes, trends, context logs, and shareable clinician reports while using read-only HealthKit access and on-device analysis. If you want a clearer way to review heart-rate patterns before your next appointment, visit Cardiogram and prepare a focused report instead of handing over an unreadable raw archive.

