We develop a framework to estimate willingness to pay (WTP) for clean air from defensive investment. Applying this framework to product-by-store level scanner data on air purifier sales in China, we provide among the first revealed preference estimates of WTP for clean air in developing countries. A spatial discontinuity in air pollution created by the Huai River heating policy enables us to analyze household responses to long-run exposure to pollution. Our model allows heterogeneity in preference parameters to investigate potential heterogeneity in WTP among households. We show that our estimates provide important policy implications for optimal environmental regulation.