From a religious viewpoint, swearing or cursing is generally considered sin. The main reason swearing is considered sin is because it reflects evil intent coming from one's heart, rather than merely the content of the word that is spoken.
From a Christian perspective, swearing and cursing is not limited to just verbal expressions of socially unacceptable words, but also anything that demeans others. According to CARM, replacing a swear word with a euphemism does not make it not a sin, because the intent is still the same. In other religions such as Buddhism, swearing and cursing is also considered a forbidden action.
In Luke 6:45, Jesus states: “The good man out of the good treasure of his heart brings forth what is good; and the evil man out of the evil treasure brings forth what is evil; for his mouth speaks from that which fills his heart.” In Ephesians 4:29, Paul states: “Let no corrupt word proceed out of your mouth, but what is good for necessary edification, that it may impart grace to the hearers.” Other Bible verses such as James 3:9-12 and 1 Peter 3:10 address how one's tongue should be properly used for edification and avoid evil and negative speech.