Corruption and imperfect contract enforcement dramatically reduce international trade. This paper estimates the reduction using a structural model of import demand in which insecurity acts as a hidden tax on trade. We find that inadequate institutions constrain trade as much as tariffs do. We also find that omission of indices of institutional quality biases the estimates of typical gravity models, obscuring a negative relationship between per capita income and the share of total expenditure devoted to traded goods. Finally, we argue that cross-country variation in the effectiveness of institutions and the consequent variation in the prices of traded goods offer a simple explanation for the stylized fact that high-income, capital-abundant countries trade disproportionately with each other.