We determined the prevalence of sexually transmitted infections (STIs), the factors associated with infection and types of counseling received by men and women from health professionals in the City of São Paulo. The investigation consisted of a cross-sectional study conducted with men and women aged between 15 and 64 years living in the City of São Paulo. Of 4,057 individuals who had engaged in sexual activity, 6.3% reported previous history of a STI: 4.3% of women and 8.2% of men. The factors associated with STI were being aged over 34 years and not using a condom during first sexual intercourse, among men, and being aged over 25 years among women. Protective factors included not having had sexual intercourse with someone from the same sex, among men, and having initiated sexual activity after the age of 15 years and not having a casual sex partner over the last 12 months, among women. Counseling about the importance of HIV and syphilis testing was received by 72.1% and 64.7% of women, respectively, while fewer than half of the men received this type of counseling (40.2% and 38.6 %, respectively). The prevalence of previous history of a STI was high among the population of the City of São Paulo. The findings of this study informed the development, implementation, and evaluation of STI policies, including those directed at HIV, leading to a reduction in the barriers that hinder access to and use of condoms and the creation of STI prevention app.