Health data schema converter: three platforms in, one shape out
Paste a payload in one of the shapes this site documents — HealthKit export.xml rows, Health Connect records in the synthetic data generator's JSON encoding, or Google Health API data points — and see it converted to the unified health-data schema v1.0.0 (9 record types), with every field traced to its source path, the conversion applied and the platform sentence it rests on. Each result is checked against the published JSON Schema. It runs in your browser; nothing you paste is uploaded. Types outside the schema, and values without a sourced conversion, are reported instead of guessed.
Runs in this tab. Nothing you paste leaves your browser.
What it reads
- HealthKit export.xml rows.
<Record>and<Workout>start tags from the file the iPhone Health app exports, read with the Apple Health export explorer’s scanner. Apple does not publish the file’s attribute names, so the converter reads the ones the file carries (type, unit, value, startDate, endDate). It maps 8 type identifiers; sleep rows are grouped into one session. - HealthKit JSON in the synthetic data generator’s encoding. HealthKit has no JSON wire format, so this is that tool’s documented encoding; a zone name in
HKMetadataKeyTimeZonebecomes an offset through your browser’s own time-zone database. - Health Connect records, keyed by class (
{ "StepsRecord": [ … ] }), in the same generator’s encoding of the Kotlin classes: Instants as ISO 8601, ZoneOffsets as +HH:MM, Mass and Length as{ value, unit }. 9 classes are mapped. - Google Health API data points, one (
{ "heartRate": { … } }) or a list response ({ "dataPoints": [ … ] }). int64 values arrive as strings and are parsed; offsets are google-duration seconds. 9 data types are mapped. - A whole sample-data download, which the converter recognizes by its
_syntheticblock.
What it refuses to guess
- A HealthKit percent above 1.0: Apple states percent is 0.0 to 1.0, so 97 is either already scaled or wrong, and the converter will not pick.
- A unit with no sourced factor (feet, stone): pounds and inches use the factors Google’s migration guide prints; anything else is refused.
- A Google
standardDeviationMillisecondsas SDNN: Google describes it as the deviation of the measurement, so only the RMSSD field converts. - A type the schema does not cover: it is listed as not converted, never dropped without a word.
How this works, and the samples
The page fetches two static files once, the mappings and the JSON Schema, and converts in this tab. There is no server code behind it and nothing is stored. Every rule it applies is a cell on the unified schema page, with the platform sentence it rests on.
SYNTHETIC — made-up values in the documented field names, for trying the converter. Not real user data. The type names, field names and enum values in them are read from the mappings when the page is built.
A free tool from AIFitnessAPI. The schema itself, with every mapping and gap, is at the unified health-data schema. More at free tools for health-app builders.
Next step
Turning this into a choice of API: