A growing body of research shows that firms' employment and wage-setting policies contribute to wage inequality and pay disparities between groups. We measure the effects of these policies on racial pay differences in Brazil. We find that nonwhites are less likely to work at establishments that pay more to all race groups, a pattern that explains about 20% of the white-nonwhite wage gap for both genders. The pay premiums offered by different employers are also compressed for nonwhites relative to whites, contributing another 5% of the overall gap. We then ask how much of the under-representation of nonwhites at higher-paying workplaces is due to the selective skill mix at these establishments. Using a counterfactual based on the observed skill distribution at each establishment and the nonwhite shares in different skill groups in the local labor market, we conclude that assortative matching accounts for about two-thirds of the under-representation gap for both men and women. The remainder reflects an unexplained preference for white workers at higher-paying establishments. The wage losses associated with unexplained sorting and differential wage setting are largest for nonwhites with the highest levels of general skills, suggesting that the allocative costs of race-based preferences may be relatively large in Brazil.