🩺→🖥→ 📊 A lightweight Python script to convert Apple Health export data into a Garmin-compatible CSV for weight tracking.
This script parses export.xml from Apple Health and extracts:
- Body weight (kg)
- Body Mass Index (BMI)
- Body Fat Percentage (%)
Then it generates a fitbit_full.csv file compatible with Garmin Connect's Fitbit CSV import.
Body
Date,Weight,BMI,Fat
2023-07-01,82.5,24.9,15.3
2023-07-03,82.2,25.1,14.7
- Open the Health app on your iPhone
- Tap your profile (top right)
- Scroll down and choose Export All Health Data
- Save the
.zipand extractexport.xml
- Install Python 3 (if not installed)
- Clone this repository
- Place
export.xmlnext to the script - Run:
python extract_body_data_for_fitbit.pyYou will get fitbit_full.csv
- Go to: https://connect.garmin.com/modern/weight
- Click ⚙️ Import (top right)
- Select Fitbit CSV format
- Upload the
fitbit_full.csvfile
Your weight data will appear on the graph.
- Written in pure Python 3
- Uses built-in libraries:
xml.etree.ElementTree,csv,datetime - No dependencies
Supports Apple Health types:
HKQuantityTypeIdentifierBodyMassHKQuantityTypeIdentifierBodyMassIndexHKQuantityTypeIdentifierBodyFatPercentage
Скрипт на Python позволяет экспортировать вес, ИМТ и процент жира из Apple Health в CSV-формат, совместимый с Garmin.
- Экспорт данных в Health на iPhone
- Сохрани
export.xml - Скопируй его в папку скрипта
- Запусти в терминале:
python extract_body_data_for_fitbit.py- Файл
fitbit_full.csvготов к загрузке в Garmin.
Forked and rewritten in Python by Mike Evdokimov — lightweight alternative to JavaScript-based Apple Health parsing tools.
Original idea inspired by arthurgousset/applehealth.