Many countries have introduced school food standards to improve the dietary intakes of school-aged children. England has school food standards (SFS) legislation in place but little is known about how well secondary schools comply with this. We aimed to assess compliance with the SFS legislation in English secondary schools and explore the impact of the SFS on pupils' nutritional intake. We conducted a cross-sectional study with English secondary schools from 2019 to 2022. We compared SFS compliance and pupil nutritional intake in schools mandated or not mandated to comply with the SFS legislation, and explored the association between school compliance and pupil nutritional intake. We assessed the percentage of SFS (%SFS) complied with by reviewing school food menus and observing food served in school canteens. We assessed pupil nutritional intake using a 24-hour dietary recall measure (Intake24) and estimated intakes of free sugar (primary outcome) and other nutrients/foods. We used adjusted multilevel models to compare pupil intakes in the SFS-mandated and SFS-non-mandated schools, and to explore the association between school SFS compliance and pupil intakes. 36 schools (23 not mandated and 13 mandated to comply with the SFS) and 2,273 pupils participated. The median %SFS complied with was 63.9% (interquartile range 60.0-70.0%). This was similar for SFS-non-mandated (64.5%) and SFS-mandated schools (63.3%). Compliance was highest for standards applying to lunchtime (median = 81.3%) and lowest for those applying across the whole school day (median = 41.7%). It was also lower for standards restricting high fat, sugar and energy-dense items (median = 26.1%) than for standards aiming to increase dietary variety (median = 92.3%). Pupils from SFS-mandated schools had a lower mean lunchtime intake of free sugar (g) (adjusted mean difference: -2.78g; 95% CI: -4.66g to -0.90g). There were few significant associations between %SFS complied with and pupil nutritional intake. English secondary schools do not fully comply with SFS legislation regardless of whether they are mandated to comply. Schools and caterers may require monitoring and support to fully comply. There is little evidence that SFS compliance is associated with better pupil nutritional intake. Food environments outside of school also need to be considered. ISRCTN68757496 (17-10-2019).