While negative correlations have often been found between a respondent's education and his attitudes towards foreigners, the reasons for this education effect are still under debate. We examined the hypothesis that the highly educated may not be genuinely less xenophobic, but simply more prone to give socially desirable, xenophile answers in attitude questionnaires. We therefore compared the attitudes of respondents who were either questioned directly or using a cheating detection extension of the randomized-response technique (RRT). The latter is supposed to yield more honest answers to sensitive questions by experimentally offering the interviewee a higher degree of confidentiality. Under direct questioning conditions, we replicated the education effect; 75% of the highly educated expressed xenophile attitudes, as opposed to only 55% of the less educated. Under randomized-response conditions, we obtained significantly reduced estimates of 53% for the proportion of xenophiles among the highly educated, and 24% among the less educated, indicating a strong distortion of self-reported attitudes towards foreigners in both groups. However, a significant proportion of participants disobeyed the RRT instructions regardless of education. Because the education effect was found even after controlling for social desirability, it seems to be a genuine effect, rather than an artefact of a differential response bias. Copyright © 2008 John Wiley & Sons, Ltd.