Soil compaction adversely influences most terrestrial ecosystem services on which humans depend. This global problem, affecting over 68 million ha of agricultural land alone, is a major driver of soil erosion, increases flood frequency and reduces groundwater recharge. Agricultural soil compaction has been intensively studied, but there are no systematic studies investigating the extent of compaction in urban ecosystems, despite the repercussions for ecosystem function. Urban areas are the fastest growing land-use type globally, and are often assumed to have highly compacted soils with compromised functionality. Here, we use bulk density (BD) measurements, taken to 14 cm depth at a citywide scale, to compare the extent of surface soil compaction between different urban greenspace classes and agricultural soils. Urban soils had a wider BD range than agricultural soils, but were significantly less compacted, with 12 per cent lower mean BD to 7 cm depth. Urban soil BD was lowest under trees and shrubs and highest under herbaceous vegetation (e.g. lawns). BD values were similar to many semi-natural habitats, particularly those underlying woody vegetation. These results establish that, across a typical UK city, urban soils were in better physical condition than agricultural soils and can contribute to ecosystem service provision.