This paper presents a novel instrumental variable strategy to estimate product quality at the microeconomic level using trade data. We construct a new firm-specific instrument based on variations in exchange rates combined with firm-specific import shares. This instrument delivers, under weak assumptions, consistent estimates of the price-elasticity of demand and firm product quality. Implementing our method on French customs data, we document the reliability of our empirical strategy. First, estimated price elasticities are related with industries’ characteristics in a consistent manner. Second, quality estimates strongly correlate with firm characteristics and expert quality ratings available within a specific industry. Finally, we use our estimates to document the quality response of French firms to low-cost competition on foreign markets. We find evidence that firms upgrade the quality of their exports when low-cost competition intensifies in the destination market. These results suggest a new channel through which firms from developed countries mitigate competition from low-wage economies.