This paper shows that improved trade facilitation can help promote export diversification in developing countries. We find that 10 per cent reductions in the costs of international transport and domestic exporting costs (documentation, inland transport, port and customs charges) are associated with export diversification gains of 4 and 3 per cent, respectively, in a sample of 118 developing countries. Customs costs play a particularly important role in these results. Lower market entry costs can also promote diversification, but the effect is weaker (1 per cent). We also find evidence that trade facilitation has stronger effects on diversification in poorer countries. Our results are highly robust to estimation using alternative dependent and independent variables, different country samples, and alternative econometric techniques. We link these findings to recent advances in trade theory that emphasise firm heterogeneity, and trade growth at the extensive margin.