Breastfeeding (BF) is fundamental for the development of the child and promotion of the affective bond between mother and child. In view of this, it is essential that medical students know how to advise on the subject, in order to stimulate BF, therefore, this study aimed to identify their knowledge in relation to knowledge, guidelines and BF management. Cross-sectional study with 252 medical students from a private university, carried out in the 2nd semester of 2021 and the 1st semester of 2022. The students answered a questionnaire that investigated seven domains that evaluated knowledge and experience about BF. The Stata Program, version 16.0, was used in the statistical analyses. Chi-square test was applied to verify differences between students without prior knowledge about BF (<7th period) and those with prior knowledge (>7th period). It was observed that students with prior knowledge obtained 65.0% (95%CI 56.2% -73.0%) of performance in the item general knowledge about BF, while students without knowledge had 13.2% (95%CI 8.3% -20.2%). The subject with the best performance in both groups, with no statistically significant difference, was BF effectiveness (96.0%; 95%CI 92.8 -97.8). The content with the worst performance was expression of breast milk, where 10.8% (95%CI 6.5 -17.5) of students without prior knowledge and 16.3% (95%CI 10.7 -23.9) with knowledge got better score. In view of the results obtained, it was concluded that students from the 7th to the 12th period obtained average knowledge about the subject, but much higher than the students from the initial periods, even with poor performance in the expression of breast milk domain.