In sociology, code switching is when a person alters their speech to conform to different cultural norms. For example, marginalized people may use one way of speaking around their community and another for those outside of it.

Code switching can be a response to various forms of oppression, such as racism and xenophobia. These systems can frame one way of speaking as superior to others.

People have differing views on code switching. Some perceive it as a negative because it may reinforce stereotypes. However, for others, code switching is a way of preserving one’s identity and culture.

Read on to learn more about code switching.

Three women sitting on a panel at a conference, one is talking into a microphone.Share on Pinterest
Maskot/Getty Images

Linguists developed the term code switching to refer to switching between two or more linguistic norms. This might mean switching between two languages or dialects. For example, a linguist might study how bilingual children switch between two languages during conversation.

However, in sociology and psychology, code switching specifically refers to the practice of switching between dialects and languages according to perceived power dynamics. It occurs when someone consciously or unconsciously feels that they must change their speech to gain safety, acceptance, or approval.

Some researchers also include changes in appearance, hair, and name in the definition of code switching.

In sociology, code switching occurs when someone feels their culture or identity may be perceived as unacceptable by others. They may also feel it will be less effective for achieving their aim. To avoid negative outcomes, they then alter their speech to match the dominant group more closely.

Specifically, a person may be worried their way of speaking could:

  • reinforce stereotypes about the group they belong to
  • result in others excluding them, discriminating against them, or making negative judgments
  • put them in physical danger

At its root, this type of code switching occurs due to the belief that one way of speaking is better than another, either because the individual believes this or because others do.

Some examples of code switching include:

  • a person toning down a regional accent or use of slang during a job interview
  • a Black person switching from African American English to American English when around white people
  • a male using a more authoritative voice than usual to conform to traditional ideas of masculinity when around other males

Code switching can be a conscious decision or unconscious behavior. Some of the factors that may influence whether a person code switches may include:

  • their awareness of any stereotypes that exist around how they speak
  • their audience, or who they are talking with
  • their ability to gauge how others perceive them
  • whether they feel they are at risk of being judged or discriminated against

Code switching can be a helpful tool for avoiding discrimination and staying safe within an unequal society. However, it does have some potential negative consequences.

A 2021 study notes that code switching requires a person to mentalize, or think about thinking. They then have to mentalize about other people, trying to anticipate how they will view them. This adds to the amount of thinking they need to do in daily life, or their “cognitive load.”

Having a high cognitive load and consistently having to scan for potential threats can be exhausting and stressful. The authors also note that code switching may result in fewer opportunities for people to express themselves authentically.

A 2023 study of restaurant workers also found that higher levels of code switching had associations with shame, depression, and intentions to leave the hospitality industry.

However, shaming people when they do code switch can also be harmful. A 2019 study of diverse students in the United States notes that “acting white” is a common accusation among young people and often refers to how a person is speaking.

The “acting white accusation” (AWA) is a form of cultural invalidation or a way of policing those who do not conform to the norms of a specific identity.

A 2022 study of 401 adults notes that the AWA had associations with anxiety and depression. The effects were more severe when the accusation came from other members of a person’s racial or ethnic group.

Code switching is a complex phenomenon. In some situations, it may be entirely necessary to avoid danger. In others, it may be unnecessary, unintentional, or even reinforce stereotypes. It can be difficult to know which is which.

However, whatever the situation, it is important to recognize that everyone communicates in different ways. There is no one “best” way to talk. Believing so only increases pressure on people to choose the “right” way, which can lead to anxiety and stress.

For those who code switch

For those who feel they are experiencing negative effects from code switching, there may be ways they can take care of themselves. This could include:

  • reconnecting with their community, native language, or identity
  • being self-compassionate toward themselves
  • spending time with people with whom a person does not have to code switch
  • beginning new relationships without code switching when it is safe to do so

For dominant groups

People in dominant groups can reinforce the prejudices and stereotypes that lead to code switching. Some things they can do to dismantle them include:

  • learning about how stereotypes around speech affect people’s lives and mental health
  • reflecting on their biases around language, accents, and dialects and actively challenging them
  • challenging others when they make jokes or judgments according to how someone speaks
  • working to understand different vernaculars, or languages or dialects
  • creating environments that welcome diversity wherever possible, such as at work

Code switching is when a person changes their language, accent, or dialect depending on the situation. In sociology, it refers to the tendency of marginalized communities to make such adjustments to avoid discrimination from a dominant group.

Sometimes, code switching also includes other forms of expression. A person might alter their clothing, their tone of voice, or their gestures to conform to the dominant culture.

Code switching is morally neutral, but it often signals an underlying problem of discrimination, especially when people feel pressure to code switch to avoid harm.