The objective of this study is to assess and quantify the risk for gestational diabetes mellitus (GDM) according to prepregnancy maternal body mass index (BMI). The design is a systematic review of observational studies published in the last 30 years. Four electronic databases were searched for publications (1977–2007). BMI was elected as the only measure of obesity, and all diagnostic criteria for GDM were accepted. Studies with selective screening for GDM were excluded. There were no language restrictions. The methodological quality of primary studies was assessed. Some 1745 citations were screened, and 70 studies (two unpublished) involving 671 945 women were included (59 cohorts and 11 case–controls). Most studies were of high or medium quality. Compared with women with a normal BMI, the unadjusted pooled odds ratio (OR) of an underweight woman developing GDM was 0.75 (95% confidence interval [CI] 0.69 to 0.82). The OR for overweight, moderately obese and morbidly obese women were 1.97 (95% CI 1.77 to 2.19), 3.01 (95% CI 2.34 to 3.87) and 5.55 (95% CI 4.27 to 7.21) respectively. For every 1 kg m−2 increase in BMI, the prevalence of GDM increased by 0.92% (95% CI 0.73 to 1.10). The risk of GDM is positively associated with prepregnancy BMI. This information is important when counselling women planning a pregnancy.