From the Catechism of the Catholic Church:
PART THREE
LIFE IN CHRIST
SECTION TWO
THE TEN COMMANDMENTS
CHAPTER ONE
“YOU SHALL LOVE THE LORD YOUR GOD WITH ALL YOUR HEART, AND WITH ALL YOUR SOUL, AND WITH ALL YOUR MIND”
ARTICLE 2
THE SECOND COMMANDMENT
You shall not take the name of the Lord your God in vain.72
You have heard that it was said to the men of old, "You shall not swear falsely. . But I say to you, Do not swear at all.73
- I. THE NAME OF THE LORD IS HOLY
2142 The second commandment prescribes respect for the Lord’s name. Like the first commandment, it belongs to the virtue of religion and
more particularly it governs our use of speech in sacred matters.
2143 Among all the words of Revelation, there is one which is unique: the revealed name of God. God confides his name to those who believe in him; he reveals himself to them in his personal mystery.
The gift of a name belongs to the order of trust and intimacy. “The Lord’s name is holy.” For this reason man must not abuse it. He must keep it in mind in silent, loving adoration.
He will not introduce it into his own speech except to bless, praise, and glorify it.74
2144 Respect for his name is an expression of the respect owed to the mystery of God himself and to the whole sacred reality it evokes. The sense of the sacred is part of the virtue of religion:
2145 The faithful should bear witness to the Lord’s name by confessing the faith without giving way to fear.76 Preaching and catechizing should be permeated with adoration and respect for the name of our Lord Jesus Christ.
2146 **The second commandment forbids the abuse of God’s name, i.e., every improper use of the names of God, Jesus Christ, but also of the Virgin Mary and all the saints. **
2147 Promises made to others in God’s name engage the divine honor, fidelity, truthfulness, and authority. They must be respected in justice. To be unfaithful to them is to misuse God’s name and in some way to make God out to be a liar.77
2148
Blasphemy is directly opposed to the second commandment. It consists in uttering against God - inwardly or outwardly - words of hatred, reproach, or defiance; in speaking ill of God; in failing in respect toward him in one’s speech; in misusing God’s name. St. James condemns those "who blaspheme that honorable name [of Jesus] by which you are called."78 The prohibition of blasphemy extends to language against Christ’s Church, the saints, and sacred things. It is also blasphemous to make use of God’s name to cover up criminal practices, to reduce peoples to servitude, to torture persons or put them to death. The misuse of God’s name to commit a crime can provoke others to repudiate religion.
**Blasphemy is contrary to the respect due God and his holy name. It is in itself a grave sin.79 **
2149 Oaths which misuse God’s name, though without the intention of blasphemy, show lack of respect for the Lord. The second commandment also forbids magical use of the divine name.
[God’s] name is great when spoken with respect for the greatness of his majesty. God’s name is holy when said with veneration and fear of offending him.80
II. TAKING THE NAME OF THE LORD IN VAIN
2150 The second commandment forbids false oaths. Taking an oath or swearing is to take God as witness to what one affirms. It is to invoke the divine truthfulness as a pledge of one’s own truthfulness. An oath engages the Lord’s name. "You shall fear the LORD your God; you shall serve him, and swear by his name."81
2151 Rejection of false oaths is a duty toward God. As Creator and Lord, God is the norm of all truth. Human speech is either in accord with or in opposition to God who is Truth itself. When it is truthful and legitimate, an oath highlights the relationship of human speech with God’s truth. A false oath calls on God to be witness to a lie.
2152 A person commits perjury when he makes a promise under oath with no intention of keeping it, or when after promising on oath he does not keep it. Perjury is a grave lack of respect for the Lord of all speech. Pledging oneself by oath to commit an evil deed is contrary to the holiness of the divine name.
2153 In the Sermon on the Mount, Jesus explained the second commandment: "You have heard that it was said to the men of old, ‘You shall not swear falsely, but shall perform to the Lord what you have sworn.’ But I say to you, Do not swear at all. . . . Let what you say be simply ‘Yes’ or ‘No’; anything more than this comes from the evil one."82 Jesus teaches that every oath involves a reference to God and that God’s presence and his truth must be honored in all speech. **Discretion in calling upon God is allied with a respectful awareness of his presence, which all our assertions either witness to or mock. **
2154 Following St. Paul,83 the tradition of the Church has understood Jesus’ words as not excluding oaths made for grave and right reasons (for example, in court). "An oath, that is the invocation of the divine name as a witness to truth, cannot be taken unless in truth, in judgment, and in justice."84
2155
The holiness of the divine name demands that we neither use it for trivial matters, nor take an oath which on the basis of the circumstances could be interpreted as approval of an authority unjustly requiring it. When an oath is required by illegitimate civil authorities, it may be refused. It must be refused when it is required for purposes contrary to the dignity of persons or to ecclesial communion.
vatican.va/archive/ccc_css/archive/catechism/p3s2c1a2.htm