Background Explaining public-goods cooperation is a challenge for evolutionary biology. However, cooperation is expected to more readily evolve if it imposes a smaller cost. Such costs of cooperation are expected to decline with increasing resource supply, an ecological parameter that varies widely in nature. We experimentally tested the effect of resource supply on the evolution of cooperation using two well-studied bacterial public-good traits: biofilm formation by Pseudomonas fluorescens and siderophore production by Pseudomonas aeruginosa. Results The frequency of cooperative bacteria increased with resource supply in the context of both bacterial public-good traits. In both cases this was due to decreasing costs of investment into public-goods cooperation with increasing resource supply. Conclusion Our empirical tests with bacteria suggest that public-goods cooperation is likely to increase with increasing resource supply due to reduced costs of cooperation, confirming that resource supply is an important factor in the evolution of cooperation.