This study presents the diet composition of western Baltic cod Gadus morhua based on 3150 stomachs sampled year-round between 2016 and 2017 using angling, gillnetting and bottom trawling, which enhanced the spatio-temporal coverage of cod habitats. Cod diet composition in shallow areas (<20 m depth) was dominated by benthic invertebrate species, mainly the common shore crab Carcinus maneas. Compared to historic diet data from the 1960s and 1980s (limited to depth >20 m), the contribution of herring Clupea harengus decreased and round goby Neogobius melanostomus occurred as a new prey species. Statistical modelling revealed significant relationships between diet composition, catch depth, fish length and season. Generalized additive modelling identified a negative relationship between catch depth and stomach content weight, suggesting reduced food intake in winter when cod use deeper areas for spawning and during peak summer when cod tend to avoid high water temperatures. The results of this study highlight the importance of shallow coastal areas as major feeding habitats of adult cod in the western Baltic Sea, which were previously unknown because samples were restricted to deeper trawlable areas. The results strongly suggest that historic stomach analyses overestimated the role of forage fish and underestimated the role of invertebrate prey. Eventually, this study shows the importance of a comprehensive habitat coverage for unbiased stomach sampling programmes to provide a more reliable estimation of top predator diet, a key information for food web analyses and multispecies models.