A research team developed a core diabetes dataset of variables to support reproducible research using UK routinely collected health data. A workshop was organized with participation of diabetologists, researchers, and patient and public representatives who discussed and prioritized variables included in the dataset. From 112 candidate variables (25 from existing datasets and 87 others), 30 variables meeting quality criteria available in primary care and NHS hospital data were included. An additional 7 variables were identified as high priority for the future as they are not currently available in existing NHS data. The new diabetes dataset is freely available and can be flexibly applied in UK electronic health records to improve care for patients with diabetes.