Taking the Lord’s name in vain is prohibited by the third of the Ten Commandments in Exodus and Deuteronomy, and swearing is further addressed by Jesus in Matthew 5.
In Exodus 20:7:
7 Thou shalt not take the name of the LORD thy God in vain; for the LORD will not hold him guiltless that taketh his name in vain.
In Deuteronomy 5:11:
11 Thou shalt not take the name of the LORD thy God in vain: for the LORD will not hold him guiltless that taketh his name in vain.
In Matthew 5:34:
34 But I say unto you, Swear not at all; neither by heaven; for it is God’s throne: