For Brazil, there are no nationwide data on HPV prevalence against which the impact of the HPV immunization program can be measured in the future. Therefore, we aim to evaluate the prevalence of genital HPV infection among adolescents and young adults in Brazil. A cross-sectional, multicentric, nationwide survey was conducted between September 2016 and November 2017. Sexually active unvaccinated women and men aged 16 to 25 years old were recruited from 119 public primary care units, including all 26 state capitals and the Federal District. All participants answered a face-to-face interview and provided biological samples for genital HPV analysis. We used an automated DNA extraction method and HPV genotyping was performed using the Linear Array genotyping test (Roche). Of 7,694 participants, 53.6% (95% CI 51.4-55.8) were positive for any HPV type. The prevalence of high-risk HPV types was significantly higher in women (38.6% vs. 29.2%, P < 0·001). The HPV types included in the quadrivalent vaccine were detected in 1002 (14.8%) specimens, with a different pattern of HPV infection between sexes. Characteristics associated with overall HPV detection included female gender, self-declaration of race as brown/pardo, lower socioeconomic class, single or dating, current smoking and having 2 or more sex partners in the past year. We found a high prevalence of HPV, with significant differences between regions. Our data provide information that may be considered when developing HPV prevention policies and constitute a baseline against which the impact of the HPV immunization program in Brazil can be measured in future years.