Corruption and imperfect contract enforcement dramatically reduce trade. This paper estimates the reduction, using a structural model of import demand in which transactions costs impose a price markup on traded goods. We find that inadequate institutions constrain trade far more than tariffs do. We also find that omitting indexes of institutional quality from the model leads to an underestimate of home bias. Using a broad sample of countries, we find that the traded goods expenditure share declines significantly as income per capita rises, other things equal. Cross-country variation in the effectiveness of institutions offers a simple explanation of the observed global pattern of trade, in which high-income, capital-abundant countries trade disproportionately with one another.