Background Pregnant women with type 1 diabetes are a high-risk population who are recommended to strive for optimal glucose control, but neonatal outcomes attributed to maternal hyperglycaemia remain suboptimal. Our aim was to examine the effectiveness of continuous glucose monitoring (CGM) on maternal glucose control and obstetric and neonatal health outcomes. Methods In this multicentre, open-label, randomised controlled trial, we recruited women aged 18–40 years with type 1 diabetes for a minimum of 12 months who were receiving intensive insulin therapy. Participants were pregnant (≤13 weeks and 6 days' gestation) or planning pregnancy from 31 hospitals in Canada, England, Scotland, Spain, Italy, Ireland, and the USA. We ran two trials in parallel for pregnant participants and for participants planning pregnancy. In both trials, participants were randomly assigned to either CGM in addition to capillary glucose monitoring or capillary glucose monitoring alone. Randomisation was stratified by insulin delivery (pump or injections) and baseline glycated haemoglobin (HbA1c). The primary outcome was change in HbA1c from randomisation to 34 weeks' gestation in pregnant women and to 24 weeks or conception in women planning pregnancy, and was assessed in all randomised participants with baseline assessments. Secondary outcomes included obstetric and neonatal health outcomes, assessed with all available data without imputation. This trial is registered with ClinicalTrials.gov, number NCT01788527. Findings Between March 25, 2013, and March 22, 2016, we randomly assigned 325 women (215 pregnant, 110 planning pregnancy) to capillary glucose monitoring with CGM (108 pregnant and 53 planning pregnancy) or without (107 pregnant and 57 planning pregnancy). We found a small difference in HbA1c in pregnant women using CGM (mean difference −0·19%; 95% CI −0·34 to −0·03; p=0·0207). Pregnant CGM users spent more time in target (68% vs 61%; p=0·0034) and less time hyperglycaemic (27% vs 32%; p=0·0279) than did pregnant control participants, with comparable severe hypoglycaemia episodes (18 CGM and 21 control) and time spent hypoglycaemic (3% vs 4%; p=0·10). Neonatal health outcomes were significantly improved, with lower incidence of large for gestational age (odds ratio 0·51, 95% CI 0·28 to 0·90; p=0·0210), fewer neonatal intensive care admissions lasting more than 24 h (0·48; 0·26 to 0·86; p=0·0157), fewer incidences of neonatal hypoglycaemia (0·45; 0·22 to 0·89; p=0·0250), and 1-day shorter length of hospital stay (p=0·0091). We found no apparent benefit of CGM in women planning pregnancy. Adverse events occurred in 51 (48%) of CGM participants and 43 (40%) of control participants in the pregnancy trial, and in 12 (27%) of CGM participants and 21 (37%) of control participants in the planning pregnancy trial. Serious adverse events occurred in 13 (6%) participants in the pregnancy trial (eight [7%] CGM, five [5%] control) and in three (3%) participants in the planning pregnancy trial (two [4%] CGM and one [2%] control). The most common adverse events were skin reactions occurring in 49 (48%) of 103 CGM participants and eight (8%) of 104 control participants during pregnancy and in 23 (44%) of 52 CGM participants and five (9%) of 57 control participants in the planning pregnancy trial. The most common serious adverse events were gastrointestinal (nausea and vomiting in four participants during pregnancy and three participants planning pregnancy). Interpretation Use of CGM during pregnancy in patients with type 1 diabetes is associated with improved neonatal outcomes, which are likely to be attributed to reduced exposure to maternal hyperglycaemia. CGM should be offered to all pregnant women with type 1 diabetes using intensive insulin therapy. This study is the first to indicate potential for improvements in non-glycaemic health outcomes from CGM use. Funding Juvenile Diabetes Research Foundation, Canadian Clinical Trials Network, and National Institute for Health Research.