Abstract: We investigate the role of social identity in explaining individual variation in social preferences in the domain of cooperation. We combine measures of social identity at both extensive and intensive margins with measures of social preferences elicited using a public goods game in the strategy method among a representative sample of Swiss households. We document a strong association between social identity and social preferences, which becomes stronger with the degree of social identity. Using different data sources, we show that social identity matters also for attitudes towards cooperation. Our results are not driven by differences in national or even local institutions, geography, historical, and economic conditions. Additional analyses show that grandparental and parental background shapes social identity, as well as social preferences. Our design allows us to go beyond behavior and disentangle social preferences from beliefs, highlighting the importance of social identity for deeper social preferences in a natural field setting.