Denosumab is a potential therapeutic agent for osteogenesis imperfecta (OI), but its efficacy and safety remain unclear in children with OI. We aimed to investigate the effects of denosumab on bone mineral density (BMD), spinal morphometry, and safety in children with OI compared with zoledronic acid. In this prospective study, 84 children or adolescents with OI were randomized to receive denosumab subcutaneous injection every 6 months or zoledronic acid intravenous infusion once. Changes of BMD and its Z-score, vertebral shape, serum levels of calcium and bone turnover biomarkers were assessed during the 1-year treatment. After 12 months of treatment, BMD at the lumbar spine, femoral neck, and total hip significantly increased by 29.3%, 27.8%, and 30.2% in the denosumab group, and by 32.2%, 47.1%, and 41.1% in the zoledronic acid group (all P < .001 vs baseline). Vertebral height and projection area significantly increased after denosumab and zoledronic acid treatment. Rebound hypercalcemia was found to be a common and serious side effect of denosumab, of which 14.3% reached hypercalcemic crisis. Rebound hypercalcemia could be alleviated by switching to zoledronic acid treatment. Treatment with denosumab or zoledronic acid is beneficial in increasing BMD and improving the spinal morphometry of children with OI. However, denosumab should be used with caution in pediatric patients with OI because of its common and dangerous side effect of rebound hypercalcemia. The appropriate dosage and dosing interval of denosumab need to be further explored in children with OI.