We measure the effects of firm policies on racial pay differences in Brazil. Non-Whites are less likely to be hired by high-wage firms, explaining about 20 percent of the racial wage gap for both genders. Firm-specific pay premiums for non-Whites are also compressed relative to Whites, contributing another 5 percent for that gap. A counterfactual analysis reveals that about two-thirds of the underrepresentation of non-Whites at higher-wage firms is explained by race-neutral skill-based sorting. Non-skill-based sorting and differential wage setting are largest for college-educated workers, suggesting that the allocative costs of discriminatory hiring and pay policies may be relatively large in Brazil. (JEL J15, J24, J31, J41, J46, J71, O15)