Coprolalia

Coprolalia is involuntary swearing or the involuntary utterance of obscene words or socially inappropriate and derogatory remarks. Coprolalia comes from the Greek κόπρος (kopros) meaning "feces" and λαλιά (lalia) from lalein, "to talk". The term is often used as a clinomorphism, with 'compulsive profanity' inaccurately referred to as being Tourette syndrome.

Related terms are copropraxia, performing obscene or forbidden gestures, and coprographia, making obscene writings or drawings.

Read more about Coprolalia:  Characteristics, Prevalence, Treatment, Perception