To assess the adequacy of prenatal care offered in the Brazilian capital cities and the diagnosis of gestational syphilis through public data from health information systems. The modified Kotelchuck index for adequacy of prenatal care was built using Brazilian Information System on Live Births (SINASC) data. Data on gestational syphilis, congenital syphilis, estimated population coverage by the Family Health Strategy (FHS), the Municipal Human Development Index (MHDI) and data from National Program for Access and Quality Improvement in Primary Care (PMAQ-AB) were accessed in public sites. The profile of pregnant women associated with inadequate care was assessed by logistic regression. In total, 685,286 births were analyzed. Only 2.3% of women did not attend prenatal appointments. The mean adequacy was 79.7%. No correlation was found between adequacy of prenatal care and FHS coverage (p = 0.172), but a positive correlation was found with the MHDI (p < 0.001). Inadequacy of prenatal care was associated with age below 20 years old, schooling less than 4 years, non-white skin color and not having a partner. Among the congenital syphilis cases, 17.2% of mothers did not attend prenatal care. Gestational syphilis more often affected vulnerable women, including a higher proportion of adolescents, women with low schooling, and women of non-white color. The PMAQ-AB showed a median availability of 27.3% for syphilis rapid tests, 67.7% for benzathine penicillin, and 86.7% for benzathine penicillin administration by health teams. The use of public data showed a low adequacy of prenatal care in Brazilian capitals, denoting insufficient quality for the diagnosis and treatment of gestational syphilis, despite the availability of supplies. Continuous monitoring can be carried out using public data, indicating to local strategies to eliminate congenital syphilis.