Previous studies suggest that Ramadan exposure during pregnancy might affect the health of women and their babies, particularly through the effect of fasting. This study aimed to evaluate the association between Ramadan exposure and fasting during pregnancy on the birth weight of newborns. This study concerned 1351 pregnant women from a prospective cohort in Jakarta, Indonesia. Ramadan exposure was based on the actual overlap between Ramadan and pregnancy. Women's fasting behaviour was recorded among 139 women who came for antenatal care between 10 July 2013 and 7 August 2013, and those who had fasted for at least 1 d (n 110) were classified as exposed to Ramadan fasting. Furthermore, a 24 h dietary recall was performed and repeated 1 month later. Birth weight of newborns who were exposed to Ramadan during pregnancy did not significantly differ from those who were not, both in the total and trimester-specific analysis. Maternal fasting did not seem to affect the birth weight of newborns (−72 (95 % CI −258, 114) g; P = 0·44), although there was a non-significant trend towards lower birth weight with fasting in the second and third trimester. Women who fasted had significantly lower total energy, macronutrient and water intake as compared with women who did not. Women's intake was also lower during Ramadan (regardless of their fasting behaviour) as compared with 1 month later. Lifestyle changes that occur with Ramadan and fasting during pregnancy are associated with lower reported energy intake. We cannot conclude on the effect of fasting on birth weight due to low statistical power.