Background The UK Biobank study provides a unique opportunity to study the causes and consequences of disease. We aimed to use the UK Biobank data to study the well-established, but poorly understood, association between low birthweight and type 2 diabetes.Methods We used logistic regression to calculate the odds ratio for participants’ risk of type 2 diabetes given a one standard deviation increase in birthweight. To test for an association between parental diabetes and birthweight, we performed linear regression of self-reported parental diabetes status against birthweight. We performed path and mediation analyses to test the hypothesis that birthweight partly mediates the association between parental diabetes and participant type 2 diabetes status.Results Of the UK Biobank participants, 277 261 reported their birthweight. Of 257 715 individuals of White ethnicity and singleton pregnancies, 6576 had type 2 diabetes, 19 478 reported maternal diabetes (but not paternal), 20 057 reported paternal diabetes (but not maternal) and 2754 participants reported both parents as having diabetes. Lower birthweight was associated with type 2 diabetes in the UK Biobank participants. A one kilogram increase in birthweight was associated with a lower risk of type 2 diabetes (odds ratio: 0.74; 95% CI: 0.71, 0.76; P = 2 × 10−57). Paternal diabetes was associated with lower birthweight (45 g lower; 95% CI: 36, 54; P = 2 × 10−23) relative to individuals with no parental diabetes. Maternal diabetes was associated with higher birthweight (59 g increase; 95% CI: 50, 68; P = 3 × 10−37). Participants’ lower birthweight was a mediator of the association between reported paternal diabetes and participants’ type 2 diabetes status, explaining 1.1% of the association, and participants’ higher birthweight was a mediator of the association between reported maternal diabetes and participants’ type 2 diabetes status, explaining 1.2% of the association.Conclusions Data from the UK Biobank provides the strongest evidence by far that paternal diabetes is associated with lower birthweight, whereas maternal diabetes is associated with increased birthweight. Our findings with paternal diabetes are consistent with a role for the same genetic factors influencing foetal growth and type 2 diabetes.