We introduce quality differentiation into a Ricardian model of international trade. The choice of quality allows firms -- for a given product -- to tailor their output to match the skills of workers in their country. It therefore weakens comparative advantages across products. We demonstrate that this basic observation has profound consequences: (1) Quality differentiation supports a pattern of international specialization where industrialized countries are active across the full board of products, complex and simple ones, while developing countries systematically specialize in the simple products. We present novel stylized facts that point to such a pattern of international specialization in the data. (2) Our theory implies that the gains from international specialization across products mostly accrue to developing countries. (3) It motivates the use of a censored regression model to estimate the link between a country's GDP per capita and the quality of its exports. Following this empirical strategy, we find a much stronger relationship than when using OLS, in line with our theory.