You fill your mind with good words. You read only good books. Listen only to good music, good conversations. This takes effort on your part. But it works.
The more you wean yourself and your heart and mind away from the profane the more it will offend you when you see/hear it.
Try it for only a little while and notice, when you have not used profanity or listened to it how harsh it sounds to your "new" ear.
I am being very serious here. One month of watching gentle movies, listening to quiet music and filling your head with wholesome thoughts and you will begin to notice a big difference and you will find that you hesitate before you swear. Where in the past you just blurted it all out. Best of Everything to You...NJoy