In this article, we analyze whether non-native speakers in the classroom affect the educational achievement and social integration of migrant and native students. In contrast to previous studies, which mainly examine the effect of the share of immigrant pupils, we focus on language heterogeneity by using a novel measure of the degree of linguistic diversity in the classroom. Our analysis is based on a comprehensive survey of 4th-grade students in German primary schools, which contains detailed information on students' language and math scores, their social integration, as well as on sociodemographic and school characteristics. We find a negative association between the share of non-native speakers in the classroom and students' test scores and their social integration in the class. Conditional on the immigrant concentration in the class, the degree of linguistic diversity has no adverse effect on students' language and math skills, but worsens the social integration of immigrant students. We demonstrate the robustness of these findings in a variety of robustness checks.