We use administrative panel data on about a quarter of a million students in the German state of Hesse to estimate the causal effect of class size on school tracking outcomes after elementary school. Our identification strategy relies on the quasi-random assignment of students to different class sizes based on maximum class size rules. In Germany, students are tracked into more or less academic middle school types at about age ten based, to a large extent, on academic achievement in elementary school. We mostly find no or small effects of class size in elementary school on receiving a recommendation or on the actual choice to attend the more academic middle school type. For male students, we find that an increase in class size by 10 students would reduce their chance of attending the higher school track - which more than 40 percent of students attend - by 3 percentage points.