Background The prevalence of primary headaches has been increasing at an alarming rate, particularly in university students. Previous studies have shown that diet-related behaviors can affect neurological disorders. Therefore, this study was conducted to examine the association between breakfast consumption patterns and primary headaches in a large population of university students.Methods In total, 83,677 university students, aged ≥18 years, from 28 provinces of Iran were included in the current cross-sectional study. Dietary intakes and breakfast consumption patterns were assessed using a validated self-administered dietary habits questionnaire. Primary headaches were determined according to the International Classification of Headache Disorders-3 (ICHD-3) criteria.Results The mean age of participants was 21.50 ± 4.01. Primary headaches were prevalent among 9% of university students. A significant inverse association was seen between breakfast consumption and odds of primary headaches (OR: 0.57, 95% CI: 0.51-0.62). This association remained significant even after taking potential confounders into account; such that students who consumed breakfast frequently had 26% lower odds of primary headaches compared with those who consumed it rarely (OR: 0.74, 95% CI: 0.65-0.85). Moreover, such a significant inverse association was observed in female students (OR: 0.54, 95% CI: 0.49-0.61) as well as those with normal weight (OR: 0.68, 95% CI: 0.58-0.79). However, it became non-significant in male students and those with overweight or obesity.Conclusions We found that frequent breakfast consumption was inversely associated with the odds of primary headaches. Further prospective studies are needed to confirm our findings.