As a result of the increased digitalisation, many countries have introduced programming in their primary education curricula. One main objective is to give all children equal opportunities to develop the skills needed to be an active participant and producer in a digitalized society. This also addresses another important objective, that of increased diversity and broadened participation. Despite technology being a natural part in our everyday lives, stereotypical views of programming as a primarily male activity still exist. In this paper, we explore girls’ and boys’ experiences of programming at school and in their spare time. The study is situated in primary school classrooms in Sweden, where programming was introduced in a cross-curricular manner as part of digital competence in 2018. While most students reported having some programming experience, it was quite limited. The results show that, compared to the girls, boys in grades 4-9 are somewhat more positive towards programming and get more programming experience both at school and in their spare time. Similarly, boys rated their self-perceived programming skills higher than the girls. In grades 1-3, no gender disparity was found in students’ attitudes, experiences or skills. However, the gender differences in grades 4-9 were not reflected to an equally high extent in the students’ programming skills, as girls and boys did equally well on many skills related tasks. The analysis highlights the importance of well planned, motivating and relevant tasks in order to provide positive experiences of programming in the classroom.