The objective was to identify dietary patterns and associated factors in schoolchildren from public schools in a city in southern Brazil. Cross-sectional, school-based study (31 schools; 1,750 students, 12-19 years), in the city of Caxias do Sul/Rio Grande do Sul, Brazil. A self-applicable questionnaire was used for data collection. Principal Component Analysis was used to identify dietary patterns and Poisson regression to test associations, considering a statistical significance level of 5% (p≤0.05). Three dietary patterns explained 39.65% of the total variance: Fast Food (19.14%); Fruits & Vegetables (13.15%) and Dairy Products (7.36%). Fast Food pattern was more likely among older students (55%; p=0.036), black/brown (33%; p=0.004), with excessive sedentary behavior (48%; p=0.003), alcohol intake (81%; p<0.001) and more family meals (56%; p=0.027). Fruits & Vegetables was more likely among sufficiently active schoolchildren (33%; p<0.001) and with more family meals (49%; p=0.001), and 30% lower among those with regular self-perceived health (p=0.014). Probability of adherence to the Dairy Products pattern was 23% lower in black/brown skin color (p=0.024); it increased with the maternal education, being higher in adolescents whose mother had completed higher education (67%; p=0.002); it was higher in those with excessive sedentary behavior (55%; p<0.001) and with more family meals (50%; p=0.007). Fast Food pattern was associated with risk behaviors, Fruits & Vegetables pattern to healthy behaviors and Dairy Products pattern to both behaviors. Our findings contribute to the formulation of public policies aimed at promoting healthy eating and other health-promoting behaviors in this population group.