Programming is perceived to be an indispensable type of literacy in the digital era. To effectively promote and implement programming in K–12 education, it is necessary to understand school principals' perception of programming education. This study adopted a mixed methods design to explain principals' understanding, expectations, and support for programming education in primary schools using Theory of Reasoned Action (TRA). In study 1, survey questionnaires were distributed to all principals from public primary schools in Hong Kong. Two hundred and sixty-six principals responded to the survey (response rate = 55.6%). In study 2, a follow-up interview study with 13 principals was conducted to further explore their perception of programming education. The results of study 1 indicated that principals with a better understanding of programming education tend to have clearer expectations of how to implement programming education in their schools, which consequently leads to greater support for the implementation of programming education. In study 2, the thematic analysis further supported the results obtained in study 1. Specifically, the results of study 2 demonstrated that most principals show understanding, expectation, and support for the implementation of programming education, which in turn results in various positive student and teacher outcomes. The results also showed that challenges are inevitable during implementation, principals show capabilities and willingness to adjust their expectation and support to better integrate programming education into their school curricula. Copyright © 2021 Elsevier Ltd. All rights reserved.