Increasing active school transport (AST) can improve population health, but its association with the urban form is not fully clear. This study investigated the association of an objective school walkability index with AST and how this association is mediated by the perceived physical and social environment. 1250 Danish students aged 11-13. years completed a commuting diary and a questionnaire. The walkability index was constituted of measures of road connectivity, traffic exposure and residential density. AST's share in all school trips was 85.4% with little difference between genders. The school walkability index was significantly associated with AST (Medium vs. Low OR 2.68; High vs. Low OR 2.49). Adding the perceived physical and social environment variables improved the model prediction of AST, with no change in the association with the school walkability index. Furthermore, distance to school significantly moderated the association between the school walkability index and AST. This research confirms the association between the urban form surrounding schools and AST. Medium and highly walkable school sites in combination with a distance to school below 2. km, no speeding traffic and many paths in the neighborhood was associated with the highest odds ratio for AST.