The best constraints on the internal structures of giant planets have historically originated from measurements of their gravity fields1,2,3. These data are inherently mostly sensitive to a planet’s outer regions, stymieing efforts to measure the mass and compactness of the cores of Jupiter2,4,5 and Saturn6,7. However, studies of Saturn’s rings have detected waves driven by pulsation modes within the planet8,9,10,11, offering independent seismic probes of Saturn’s interior12,13,14. The observations reveal gravity-mode pulsations, which indicate that part of Saturn’s deep interior is stable against convection13. Here, we compare structural models with gravity and seismic measurements from Cassini to show that the data can only be explained by a diffuse, stably stratified core–envelope transition region in Saturn extending to approximately 60% of the planet’s radius and containing approximately 17 Earth masses of ice and rock. This gradual distribution of heavy elements constrains mixing processes at work in Saturn, and it may reflect the planet’s primordial structure and accretion history.