To determine the association of state laws on nonprofit hospital community benefit spending. We used multivariate models to estimate the association between different types of state-level community benefit laws and nonprofit hospital community benefit spending from tax filings. All 50 US states. A total of 2421 nonprofit short-term acute care hospital organizations that filled an internal revenue service Form 990 and Schedule H for calendar during years 2009-2015. Between 2009 and 2015, short-term acute care hospitals spent an average of $46 billion per year in total, or $20 million per hospital on community benefit activities. Exposure to a state-level community benefit law of any type was associated with an $8.42 (95% confidence interval: 1.20-15.64) per $1000 of total operating expense greater community benefit spending. Spending amounts and patterns varied on the basis of the type of community benefit law and hospital urbanicity. State laws are associated with nonprofit hospital community benefit spending. Policy makers can use community benefit laws to increase nonprofit hospital engagement with public health.