Is it haram to say swear or curse words. I think it’s a bad habit and I say inadvertently sometimes. Is it haram or makruh?

It’s not allowed except in times where you have been oppressed to a severe level and staying aloof from it leads to high morals.