Voters frequently use demographic characteristics such as race or gender as shortcuts when evaluating politicians. We use two survey experiments to show that candidates’ gender identity (specifically whether they identify as the same gender as the sex they were assigned at birth) functions as a similar cue. When a news story identified candidates as transgender, respondents rated them as more liberal and less likely to represent them, and less likely to receive their vote. The overall electoral penalty is moderated by voters’ party, ideology, religiosity, and authoritarianism. In contrast to research on other demographic cues, we find that these effects persist even in the presence of cues about the candidate’s party, suggesting that voters infer substantial information from politicians’ gender identity.