Social norms against prejudice are widespread and generally supported by society, yet examples of bigotry are often found. I propose that anti-prejudice norms can quickly erode when individuals are exposed to hate content, therefore, facilitating the expression of prejudice. To test this, participants were invited to participate in an experimental online forum discussing immigration. I compare the comments of participants exposed to xenophobic content to those not exposed. The empirical results show that exposure to hateful content erodes norm compliance: the more hateful content participants could observe, the more hateful their subsequent comments were. The effect is primarily driven by those more likely to hold anti-immigrant views. This points to an ‘emboldening effect’ whereby prejudiced individuals refrain from expressing prejudiced opinions in the absence of offensive speech. Otherwise, hidden attitudes are revealed. The results confirm that the expression of prejudice is context dependent and that preserving a ‘norm environment’ requires sustained reinforcement of the norm. Furthermore, the results show that the composition of the population in terms of individual beliefs is paramount for the dynamics of erosion of the social norm. On the whole, these findings can inform effective public strategies against the spread of hate speech and offer a new methodological approach for studying hate speech in online contexts.