ABSTRACT Objective Characterize and comparatively analyse the organization of nutritional attention to prenatal care, the puerperium period and breastfeeding, in primary health care, in two municipalities of Baixada Santista, São Paulo, Brazil. Methods This was an exploratory-analytical study of family health units and the mixed basic care units of Cubatão (n=17) and Guarujá (n=14). For this purpose, seven domains of the Nutritional Attention Assessment Instrument in Primary Health Care were used. Descriptive analysis and the Mann-Whitney and Pearson’s chi-square tests were performed. Results In the comparison between the municipalities, the best scores were obtained in Guarujá. Statistically significant differences were found for the following indicators: support for nutritional attention actions: infrastructure and permanent education (<0.001); food and nutritional surveillance (<0.001); nutritional attention focused on prenatal care (<0.001); and nutritional attention focused on postpartum care and breastfeeding (0.012). Nutritional attention actions for mother-infant groups were more frequent in the city of Guarujá, which compared with Cubatão, achieved better scores for the nutritional attention evaluation indicators. Conclusion The municipality of Guarujá had better indicators of infrastructure and permanent education, food and nutrition surveillance, and puerperal and breastfeeding nutritional care. However, weaknesses persist in the organization of nutritional care in the two cities studied, especially regarding the work process.