The nice thing about working in an office is getting to enjoy the camaraderie that comes with being part of a team. And if you're lucky, you may even develop strong relationships with your colleagues that eventually evolve into friendships.

But while it's nice to shoot the breeze with your co-workers about things like weekend plans, sports team, popular TV, and food trends, it's less pleasant to find yourself in a situation where all your colleagues seem to want to do is gossip about the people you work with.

On a basic level, it can be uncomfortable for you as a non-gossiper. On a more serious level, it could result in consequences if your co-workers disparage another employee and word gets back to HR. Here's what you can do to escape that nonstop gossip and preserve your professional reputation at the same time.

Closeup of woman in dress shirt standing in front of woman whispering into man's ear

IMAGE SOURCE: GETTY IMAGES.

1. Opt out

Gossiping is mean-spirited at its core. But while you won't get in trouble at work for thinking bad thoughts about your lazy co-worker, you could face serious repercussions if you take part in a conversation that fuels rumors about the source of that co-worker's laziness. The solution? Don't participate. Simply remove yourself from the conversation, and if your colleagues ask why, be honest about your feelings toward gossip.

But express those feelings non-judgmentally, because, let's face it, gossip is a common practice, and you don't necessarily want to alienate your colleagues by coming off as holier-than-thou. Instead, just say that gossiping makes you uncomfortable, and that frankly, you're nervous about getting in trouble for it. With this approach, you're not chiding your co-workers for engaging in that behavior; you're just choosing not to be a part of it.

2. Change the topic

Sometimes, all it takes is a little conversational strategy on your part to nip gossiping in the bud. Though this tactic may not work all the time, you can occasionally avoid gossip by taking the discussion in a different direction as opportunity allows for.

For example, if your colleagues are in the midst of badmouthing another co-worker over her too-tight clothing, you can chime in with something like, "Speaking of clothing, my friend's pop-up boutique is having a major sale this weekend. Let me dig up the details." Chances are, that'll work at least some of the time.

3. Know when to report it

Sometimes, gossip can reach the point where it evolves into harassment or clearly violates company policy. If you don't want your gossipy co-workers to take you down with them, report their behavior to your manager or HR. If you can do so anonymously, that's probably ideal, but if the rumors being spread about other people you work with are dangerously derogatory, it's imperative that you protect yourself by making it clear that you're not part of those discussions.

LinkedIn reports that 21% of employees regularly gossip at work. If you're tired of being surrounded by gossip, use these tactics to free yourself from those conversations -- and avoid getting in trouble needlessly.