January 19, 2024/Mental Health

Cracking Code-Switching

Presenting yourself differently in different contexts can be both empowering and isolating

Person holding three different masks while looking at a group of diverse people

In the 2014 season of the wildly successful sketch comedy show Key and Peele, there was a skit dedicated to the concept of code-switching. It’s called “Obama Meet and Greet.”


Cleveland Clinic is a non-profit academic medical center. Advertising on our site helps support our mission. We do not endorse non-Cleveland Clinic products or services. Policy

In the scene, then-President Barack Obama — portrayed by Jordan Peele — is introduced to a series of people following a speech. He shakes hands and offers a buttoned-up, “Nice to meet you” to each white supporter. Then, when he encounters a Black constituent, he smiles, gives him a hug and says, “C’mon brotha! What’s up fam?”

The discordance in the President’s behavior continues down the rope line. When he’s introduced to a person of indeterminate race (played by Keegan-Michael Key) he freezes, unsure how to act until the Secret Service gives him more information.

The sketch has stood the test of time — and resonates so deeply — because code-switching is a behavior most of us perform daily in one way or another. But is that a good thing?

We talked to psychologist Kia-Rai Prewitt, PhD, about code-switching — its upsides, its downsides and its impact on our mental health.

What is code-switching?

You probably know code-switching when you see it. But defining it can be tough.

Dr. Prewitt describes it this way: “It’s basically a way of changing your style, dress, or maybe even language or behavior, in order to match what you think would be appropriate or would make someone else feel comfortable.”

While it can happen in a range of contexts for a host of reasons, we usually talk about code-switching in terms of race or ethnicity. But identity is complicated. And Dr. Prewitt is quick to note that we all have multiple (and intersecting) identities. Maybe your racial or ethnic background doesn’t require you to code-switch, but your religion, immigration status, socioeconomic class, level of education, gender identity or ability status does.

“None of us have just one absolute identity,” Dr. Prewitt posits, “but I do think the salience of our identity — or the identity that we consider most relevant at the moment — depends on the context you’re in.”

For example, if you’re attending religious services, your religious identity might take center stage. If you leave those services and go to a Chinese New Year celebration downtown, your religion might take a backseat to your cultural heritage.

Basically, it’s about fitting in, as best you can, from moment to moment.

“If you identify as part of a marginalized population,” Dr. Prewitt illustrates, “you may have a different style of interacting with someone who’s a part of that group, versus interacting with somebody who may be part of the majority culture.”

Simply put: Code-switching is about choosing which of your identities you make visible, when you make them visible and to whom you make them visible. It’s a form of both self-protection and self-sacrifice.

Code-switching examples

Here are just a few examples of what code-switching can look like in practice:

  • A person who hides or goes without a religious adornment, like a cross, a yarmulke, a kirpan or a hijab, to avoid attracting unwanted attention.
  • A peer who covers up traditional tattoos — like Inuit kakiniit or Māori tā moko — to fit in with others.
  • A child whose accent, vocabulary or default language changes when they’re at home vs. when they’re at school.
  • An individual who uses a nickname instead of their given “ethnic” name, so their friends or colleagues don’t have to learn how to properly pronounce it.
  • A woman of South Asian heritage removing a nose piercing or straightening her hair each morning to “look more professional” in the office.
  • Somebody adjusting their vocal cadence to “sound straight,” or eliminating a regional accent that’s associated with a lack of intelligence.
  • Not disclosing an invisible disability for fear that you’ll be regarded as less capable.
  • A person who always shows up to work early and stays late to counteract the stereotype that people of their race or ethnicity are “lazy.”

The key to all of these examples: The change an individual makes to fit in can be undone. Undergoing plastic surgery, having a tattoo removed or physically relocating would not count as code-switching.

Why do people code-switch?

Some code-switching is intentional, like when we choose clothing or accessories to wear to an event that will help us “fit in.” In other cases, it’s automatic. For example, you may slip into a different language, accent or cadence when speaking to certain people without even realizing it.

Whether or not we intend to do it, Dr. Prewitt notes that there are a lot of reasons people code-switch. Sometimes, she explains, we code-switch to counteract stereotypes about (or live up to expectations for) groups we belong to. Other times, we’re responding to an institutional culture or expectation. We may even code-switch because it makes us feel safe.

Dr. Prewitt points to hair bias as an example. The 2023 CROWN Workplace Research Study, sponsored by LinkedIn™ and Dove™, found that employers are two and a half times more likely to perceive Black women’s hair as unprofessional. Stories abound of black women having their hair touched without permission, getting sent home or being disparaged for wearing a natural, culturally significant or protective hairstyle.

Those past experiences have made code-switching a common practice for Black women in interview settings. The CROWN study found that approximately two-thirds of Black women change their hair for a job interview — and that they are 54% more likely to feel that they have to wear their hair straight for an interview to go well. When they make those adjustments, they are code-switching to protect themselves and preempt criticism.

“Since there has been bias within these different systems in the past, people feel like they have to adjust how they typically would present themselves in order to have an opportunity, get accepted, or be taken seriously,” Dr. Prewitt explains.

In other words, code-switching isn’t always a reflection of your environment, but it usually does reflect past experiences and patterns of injustice faced by a person or group.

Pros of code-switching

When we engage in code-switching, we’re demonstrating flexibility: We are perceiving and responding to a change in our environment. Doing so means we get to interact with a wider variety of people in a wider variety of circumstances.

“It’s about being able to connect with different groups around different interests,” Dr. Prewitt explains.

She offers the example of speaking to a room full of both educators and businesspeople. These professions each come with their own priorities, standards and vocabularies. They may even receive and respond to information in different ways. To successfully convey information to the whole group then, a speaker needs to adapt their presentation to be accessible to both groups.

Put differently, code-switching makes it possible to reach and connect with more people, opens up opportunities that might otherwise be closed to and enriches your understanding of the world. In that way, code-switching can be good for you.

Cons of code-switching

For all of its benefits, code-switching isn’t always a positive thing. Dr. Prewitt has also seen code-switching lead to intense feelings of disconnection and isolation.

And it’s not just about how we feel — though that’s important, too. Sometimes, our efforts to make other people accept us have the opposite effect. Dr. Prewitt offers the example of a team of co-workers:


“If members of your peer group at work notice that you behave differently with them than you do with people outside the office,” she says, “you could be perceived as disingenuous or untrustworthy.”

What toll does code-switching take on mental health?

While code-switching is a valuable skill, adapting to different circumstances isn’t easy. In fact, it can be detrimental to a person’s self-concept.

“If you feel like you always have to put on like this other identity, like you have to constantly change your language or how you present yourself — or if you're afraid that just being yourself would not be considered acceptable — then I think that code-switching can lead to feelings of low confidence,” Dr. Prewitt states.

She adds that being consistently concerned about social acceptance can also lead to anxiety. In fact, discrimination and/or recurrent microaggressions can even cause post-traumatic stress disorder (PTSD).

Finding confidence

If code-switching leaves you feeling less like a social butterfly and more like a pretender, it’s probably time to talk to somebody you trust about it. While that might be a therapist, Dr. Prewitt’s clear that it doesn’t have to be.

“You could also start with someone like a supervisor or mentor,” she suggests. “You want to choose someone — at work or elsewhere — that you have a good relationship with, that you think is able to give good feedback or who you strive to be like. See if they’ve ever dealt with these feelings before and, if so, how they’ve worked through them.” An outside perspective can be especially helpful if you’re code-switching to navigate a toxic environment.

When to get help

The advice of a trusted friend or colleague may be all you need to tamp down your anxiety and boost your confidence. But sometimes, it’s necessary to go a step further and address the feelings you’re experiencing with a healthcare provider.

Dr. Prewitt says the following are telltale signs that it’s time to invest in your mental health:

  • You’re feeling more depressed. Mood matters, but you don’t have to be “down in the dumps” to be struggling with clinical depression. In fact, depression is rarely “all in our heads.” It’s a full-body experience. Fatigue, appetite changes, sleeping too much or too little and poor focus and concentration are all signs of clinical depression.
  • You’re becoming increasingly anxious. Like depression, it’s very possible to have an anxiety or panic disorder and not realize it. That’s because these conditions often build over time, and express themselves physically. Sweating, palpitations, chest pains, nervous poops: Our fight-or-flight response can really tie us up in knots!
  • You’re burning out. When you’re burnt out, you’re physically, mentally and emotionally exhausted. Keep a weather eye for the symptoms: lack of energy, a negative or cynical attitude and declining performance. It can take a long time to fully recover from burnout, but the sooner you get help and make some lifestyle changes, the sooner the fog will lift.
  • You’re withdrawing from others. Do you dread school in a way you never have before? Are you calling in sick because you don’t want to be at work? Are you saying no to invitations or opportunities you’d usually be thrilled to get? Isolating yourself might feel like the best option in the moment, but it may negatively affect your relationships in the long run. Loneliness can also hurt your physical health.

The key to code-switching

Code-switching involves changing the way you behave or present yourself in order to fit in, make the people around you comfortable, disprove a stereotype or protect against discrimination. It can be a positive thing, because it enables you to interact with a wide variety of people and adapt to a range of environments and circumstances.

But code-switching also has a downside: It can leave a person feeling isolated or self-conscious. They may worry that the “real” them isn’t socially acceptable. To make matters worse, some people may interpret code-switching as disingenuous, which can have a negative impact on relationships.

If you feel that code-switching is having a negative impact on your daily life, consider reaching out to a trusted friend, colleague or mentor. If you’re experiencing symptoms of mental health issues like depression, anxiety or burnout, it’s a good idea to speak to a healthcare provider.

Learn more about our editorial process.

Health Library
Emotional Stress: Warning Signs, Management, When to Get Help

Related Articles

Two friends laughing together
March 26, 2024/Mental Health
No Fooling: The Very Real Health Benefits of a (Good) Prank or Joke

A pro-level laugh can release good-for-you oxytocin, dopamine and endorphins

person pulling open blue curtains to sunshine
March 4, 2024/Mental Health
Not Feeling Like Yourself Lately? How To Get Out of a Funk

Connecting with others, going for a walk or focusing on sleep quality can help more than you might realize

person sitting in a growing flower, as they're watering the pot from above
February 9, 2024/Mental Health
Self-Love: Why It’s Important and What You Can Do To Love Yourself

Like being your own best friend in times of trouble, self-love is an act of self-preservation

person standing on exclamation point holding up a No. 1 finger, wearing cape and mask in front of crowd
February 1, 2024/Mental Health
How To Make the Most of Your ‘Villain Era’

It’s not about embracing your dark side — it’s about showing up for yourself

Silhouette of person turned away from group of people talking
January 23, 2024/Mental Health
How the Grey Rock Method Can Protect You From Abusive People and Toxic Interactions

Like a boring ol’ grey rock, the goal is to be unresponsive and uninteresting to dissuade a harmful situation

person looking at reflection in hand-held mirror
January 22, 2024/Mental Health
9 Signs You’re Dealing With a ‘Narcissist’ (and Why That’s the Wrong Word to Use)

Narcissistic personality disorder is a mental health condition, not an insult

Female sitting on couch staring blankly ahead, with male next to her on couch staring at her
January 19, 2024/Sex & Relationships
The Silent Treatment: Causes and Coping

Whether this behavior is abusive depends on the person doing it and their motivation

Person talking with therapist in a private setting
January 4, 2024/Mental Health
Here’s Why You Shouldn’t Put Your Mental Health on the Backburner

You may not always notice it, but your mental health has just as big of an impact on your well-being as your physical health

Trending Topics

Person in yellow tshirt and blue jeans relaxing on green couch in living room reading texts on their phone.
Here’s How Many Calories You Naturally Burn in a Day

Your metabolism may torch 1,300 to 2,000 calories daily with no activity

woman snacking on raisins and nuts
52 Foods High In Iron

Pump up your iron intake with foods like tuna, tofu and turkey