Why is GDP so much more volatile in poor countries than in rich ones? To answer this question, we propose a theory of technological diversification. Production makes use of different input varieties, which are subject to imperfectly correlated shocks. As in endogenous growth models, technological progress increases the number of varieties, raising average productivity. In our model, the expansion in the number of varieties provides diversification benefits against variety-specific shocks and it hence lowers the volatility of output. Technological complexity evolves endogenously in response to profit incentives. Complexity (and hence output stability) is positively related with the development of the country, the comparative advantage of the sector, and the sector’s skill and technology intensity. Using sector-level data for a broad sample of countries, we provide extensive empirical evidence confirming the cross-country and cross-sectoral predictions of the model.