The role of social identity, and specifically gender, in people’s attitudes towards swearing has been heavily studied and debated, but this research takes a mostly quantitative approach and the experiences of transgender people have not yet been considered. The current study used an online mixed methods survey to explore the role of social identity in swearing, with a focus on transgender experiences. 433 cisgender and 47 transgender participants completed self-report measures assessing swearing frequency and attitudes towards swearing, as well as open-ended questions exploring the role of social identity in their attitudes and frequency. Results showed no significant differences between men, women, and nonbinary people, supporting research suggesting that gender differences in swearing have diminished. Transgender people had significantly more liberal attitudes towards swearing than cisgender people, but there was no significant difference in frequency. Inductive thematic analysis on transgender participants’ responses produced three themes describing the factors determining their attitudes towards swearing: perceived threat, swearing as a progressive act, and fear of causing offense. Inductive thematic analysis on all responses produced three themes describing the motivations behind swearing to perform identity: swearing to fit in, swearing to form identity-based bonds, and swearing to express beliefs. Findings support the theory that people perform their social identities through language, and that the way in which people perform their identities through swearing is a product of self-categorization theory, but is mediated by the likelihood of causing offense, and the swearer’s perceived associated risk from this.