S*!t happens.

Your computer crashes taking the document you’ve worked hours on with it. You lose one of your biggest clients. You slam your finger in a drawer.

Bad words are bound to slip out of your mouth at the office. As profanity becomes more common in every day speech, it becomes more difficult to control, said Richard Alaniz, a labor and employment attorney.

But that doesn’t mean it should be a welcome or pervasive part of the office culture.

“Employers need to be aware that by ignoring it and thinking [expletives] have become so commonplace, that they run the risk of creating a potential legal liability.”

While he said it’s rare for an employer to fire anyone for an occasional swear word, he’s had clients terminate employees for repeatedly using vulgar or profane language in the workplace.

So workers should be a little more aware when choosing their words in the workplace.

Don’t tarnish your brand

We are all responsible for creating and maintaining our own brand, and if you come across as a hothead or someone who’s not in control of your emotions or language, your boss might be hesitant to put you in front of clients or to have you represent the company.

“Why would I send that person to a new client?” said Barbara Pachter, author of “The Essentials of Business Etiquette. “That is not the image I would want to create.”

Being known as someone with a potty mouth can also cause people to avoid you or feel uncomfortable around you.

Pachter recalled working with a company where the boss cursed so much at his weekly meetings that his employees would avoid being nearby. “You can get labeled as not a nice guy.”

Even when having a friendly conversation with a co-worker in the office, you should still be careful with your language,

“You might think it’s casual and you are feeling comfortable, but you are still in the workplace and there is a certain level of professionalism that needs to be maintained,” said Diane Gottsman, author of Modern Etiquette for a Better Life and founder of The Protocol School of Texas. “You never know if you are within earshot of the boss or clients.”

Acknowledge and apologize if the F-bomb slips out

No matter how careful you are with your language, it’s easy to slip up sometimes. It’s how you deal with it that can allow you to move on with little impact.

If you’re in the middle of a presentation and something unexpectedly goes awry and you drop an expletive – address it and move on.

“Just apologize and say that was reactionary and please forgive me and then let it be,” said Gottsman.

Bad language blunders tend to be more accepted when they are occasional and in reaction to a deserving event.

“The reality is that occasionally something is going to slip out, especially if we just lost a project or slammed our finger in a drawer,” said Gottsman. “But getting a paper jammed in the copier – that is just not enough reason to go off – it looks as if you can’t handle stress.”

Avoid putting it in writing

Yes, a bad word is bound to be uttered from time to time. But avoid using it in emails, work-related texts and messages or voice messages.

“It’s a paper trail,” said Vicki Salemi, career expert at Monster. “You might have sent the email jokingly to a co-worker, but then all of a sudden the email goes up the leadership chain and next thing you know the vice president has the email and your name is attached to it.”

She added that reading a bad word can come off worse since you have less context without body language and tone. “You want to remove any liability to your brand,” Salemi said.

Know your audience

Cursing in the workplace isn’t always completely off limits.

Even bad language can sound more colloquial and informal, at least among the right audience. And it can also express intense emotions in a safe way.

“You get camaraderie, break some tension and stress,” said Timothy Jay, a professor of psychology at the Massachusetts College of Liberal Arts in the Berkshires. “It’s much better than any type of physical aggression.”

He uses swear words sparingly in his classroom, but does warn students he will use them from time to time if he’s trying to make a point or get their attention. He says this usually goes over well, at least in a room full of college students.

“They will say that it makes me seem more like one of them, and not on a pedestal. More like a normal person”