Only a few studies have focused on the association between overall diet, rather than intakes of individual nutrients or foods, and depressive symptoms in Japanese. This cross-sectional study examined associations between a diet quality score and depressive symptoms in 3963 young (age 18 years) and 3833 middle-aged (mean age 47·9 (sd 4·2) years) Japanese women. Dietary information was collected using a diet history questionnaire. A previously developed diet quality score was computed mainly based on the Japanese Food Guide Spinning Top. The prevalence of depressive symptoms was 22·0 % for young women and 16·8 % for middle-aged women, assessed as a Center for Epidemiologic Studies Depression (CES-D) score ≥23 and ≥19, respectively. As expected, the diet quality score was associated positively with intakes of 'grain dishes', 'vegetable dishes', 'fish and meat dishes', 'milk' and 'fruits' and inversely with intakes of energy from 'snacks, confection and beverages' and Na from seasonings. After adjustment for potential confounders, OR for depressive symptoms in the highest v. lowest quintiles of the diet quality score was 0·65 (95 % CI 0·50, 0·84) in young women (P for trend=0·0005). In middle-aged women, the corresponding value was 0·59 (95 % CI 0·45, 0·78) (P for trend<0·0001). Analyses where the diet quality and CES-D scores were treated as continuous variables also showed inverse associations. In conclusion, this cross-sectional study showed that a higher diet quality score was associated with a lower prevalence of depressive symptoms in young and middle-aged Japanese women. Prospective studies are needed to confirm a public health relevance of this finding.