The study aims at describing students’ epistemic beliefs over school years 5–11, investigating differences between Sweden and Germany regarding the ‘trajectories’ of epistemic beliefs over the grades, and if classroom factors can explain these differences. A cross-sectional survey, covering grades 5–11, was distributed to 1501 students in Sweden and 2839 in Germany to assess their epistemic beliefs and perceived classroom environment in chemistry. Factor analysis revealed four valid constructs for students’ epistemic beliefs and perceived classroom environment, respectively. A common trend for both countries was an increasing sophistication over grades as to the Certainty of knowledge and an emphasis in all grades on the need for evidence from several sources to make claims of knowing (Justification). Trust in authorities decreased over the grades in Germany, while Swedish students showed similar levels in all grades. Beliefs in dynamic and changing knowledge was strong in both countries, with an increasing trend in Germany while stable in Sweden. Significant correlations between epistemic beliefs and perceived classroom environment were found in both countries, but stronger in Sweden than Germany