This paper studies how firms allocate their Corporate Social Responsibility (CSR) expenditures to inform the welfare effects of corporate contributions to public goods. We use a novel dataset covering the quasi-universe of firms’ CSR expenditures in India over the period 2015-2019, which includes detailed information on CSR projects. We document key stylized facts on the allocation of CSR spending across social topics (e.g., health, education) and locations. Using natural language processing to measure the technological proximity between firms’ production technology and topics, we find that firms spend more on topics in which they have a comparative advantage. This is consistent with an efficient allocation of CSR expenditures across topics and the main rationale for CSR in the literature. Considering allocation across locations, however, we find that firms spend more in areas where social returns are low; CSR spending seems less equitably allocated than government expenditures. Overall, our results suggest that CSR mandates may be an efficient but inequitable way to increase public good provision.