Item response theory (IRT) is a psychometric method that provides probabilistic model-based measurements. Its use is relatively recent in the assessment of food consumption, especially through dietary assessment tools. This study aims (1) to develop a food-based diet quality scale for Brazilian schoolchildren using IRT, and (2) to apply the scale to a representative sample of schoolchildren from a Southern Brazilian city. The scale was developed with daily consumption frequency of foods from 835 students who completed the Food Intake and Physical Activity of Schoolchildren questionnaire. Questionnaire foods were grouped into 10 items according to their nutritional similarities and were evaluated by full-information factor analysis that indicated a dominant factor explaining 28% of the variance. Psychometric item analysis was performed using Samejima’s model. The scale covered all levels of diet quality, from “very poor” (scores < 95) to “very good” (scores ≥ 130). Children who had higher diet quality scores consumed beans, meat, fish, eggs, fruits, vegetables, dairy products, and water more frequently, while reducing the consumption of ultraprocessed sugary foods, ultraprocessed savoury snacks and sausages, and sugary drinks. Of 6323 children, an average of less than 10% consumed the highest diet quality scores (good or very good diet quality) and about 60% of children consumed low diet quality scores. The scale can be applied to other schoolchildren with the same measure precision.