In the Catholic Church, the Seal of Confession (or Seal of the Confessional) is the absolute duty of priests not to disclose anything that they learn from penitents during the course of the Sacrament of Penance (confession). Even where the seal of confession does not strictly apply - where there is no specific serious sin confessed for the purpose of receiving absolution - priests have a serious obligation not to cause scandal by the way they speak.
Canon 21 of the Fourth Council of the Lateran (1215), binding on the whole church, laid down the obligation of secrecy in the following words:
Let the priest absolutely beware that he does not by word or sign or by any manner whatever in any way betray the sinner: but if he should happen to need wiser counsel let him cautiously seek the same without any mention of person. For whoever shall dare to reveal a sin disclosed to him in the tribunal of penance we decree that he shall be not only deposed from the priestly office but that he shall also be sent into the confinement of a monastery to do perpetual penance.-- Hefele-Leclercq, Histoire des Conciles at the year 1215; Mansi or Harduin, "Coll. conciliorum"
Gratian, who compiled the edicts of previous Catholic Ecumenical Councils and the principles of church law, published the Decretum about 1151. It includes the following declaration of the law as to the seal of confession: "Let the priest who dares to make known the sins of his penitent be deposed." Gratian goes on to say that the violator of this law should be made a lifelong, ignominious wanderer. Notably, neither the Lateran canon nor the law of the Decretum purports to enact for the first time the secrecy of confession. The 15th century English canonist William Lyndwood speaks of two reasons why a priest is bound to keep secret a confession, the first being on account of the sacrament because it is almost (quasi) of the essence of the sacrament to keep secret the confession.[clarification needed]
The Summa Theologiae devotes one article to the seal of confession, explaining that the seal may not be violated, including regarding matters that might indirectly lead to the seal's violation, not even violated by those who hear the confession. Thomas gives two reasons for the seal's inviolability: the seal is divinely instituted and the seal prevents scandal.
According to the Roman Catechism, "the faithful are to be admonished that there is no reason whatever to apprehend that what is made known in confession will ever be revealed by the priest to anyone, or that by it the penitent can at any time be brought into danger of any sort...Let the priest, says the great Council of Lateran, take special care, neither by word or sign, nor by any other means whatever, to betray in the least degree the sinner."
The Catechism of the Catholic Church teaches in paragraph 1467:
The Compendium of the Catechism of the Catholic Church elaborates that a confessor is bound to secrecy.
In Note on the importance of the internal forum and the inviolability of the Sacramental Seal, the Apostolic Penitentiary explained that the sacramental seal is universally and permanently inviolable as a matter of de fide dogma, and as part of freedom of religion and freedom of conscience, despite civil law.
According to Roman Catholic canon law, "The sacramental seal is inviolable; therefore it is absolutely forbidden for a confessor to betray in any way a penitent in words or in any manner and for any reason." The confessor is always an ordained priest, because in the Catholic Church only ordained priests can absolve sins; lay confession is not recognized. Any person who overhears a confession is likewise bound by the seal.
Priests may not reveal what they have learned during confession to anyone, even under the threat of their own death or that of others. Punishment for breaking the seal of the confessional is conferred by the severity of the violation: "a person who violate directly violates the seal of the confessional (that is: explicitly connects a sin to a penitent) "incurs a latae sententiae excommunication." One who breaks the seal "indirectly" (that is: through their words and actions make known a particular penitent's sins and somehow connects those sins to the penitent) would be punished according to the "gravity of the delict."  Both St. John Paul II and Pope Benedictine XVI made it a practice to attach a latae sentintiae excommunication to indirect violations of the seal. Those who are privy to another person's confession either as an interpreter or by accidental circumstance are likewise punished according to the gravity of their delict "not excluding excommunication." .
In the Early Modern period, some casuists (Thomas Sanchez, etc.) justified mental reservation, a form of deception which does not involve outright lying, in specific circumstances including when such an action is necessary to protect secrecy under the seal of the confessional. Other casuists considered "grey areas" in which it was unclear whether or not the seal was being violated. A priest who says "I do not know" is thus to be understood "I do not know with knowledge outside the Seal of the Confessional"; St. Thomas Aquinas goes even farther and says that the priest knows the confession "not as man, but as God knows it."
There are limited cases where portions of a confession may be revealed to others, but always with the penitent's permission and always without actually revealing the penitent's identity. This is the case, for example, with more serious offenses, as some excommunicable offenses are reserved to the Holy See and their permission to grant absolution must be obtained. In these cases, the priest hearing the confession asks the permission of the penitent to write a petition, using pseudonyms and containing the absolute minimum information necessary, to the bishop or to the Apostolic Penitentiary, the cardinal delegated by the Pope to handle such requests. This request may be forwarded, sealed, through the apostolic delegate or nuncio in a country (the Pope's ambassador), to be guarded by the privilege of a diplomatic pouch.
The law of different jurisdictions in general requires people under certain circumstances to testify about facts known to them. In many cases the rule of evidence of confessional privilege forbids judicial inquiry into communications made under the seal of confession.
There may be conflict between the obligation of confidentiality of confession and civil law. The Louisiana Supreme Court ruled in 2014 that a priest may be compelled to testify about what he was told in the confessional regarding a particular sexual abuse case, leaving the priest at risk of excommunication if he even confirms that a confession took place, or jail for contempt of court should he refuse to testify. However, the Court later ruled that a priest has no duty to report confidential information heard during a sacramental confession.
John of Nepomuk, Mateo Correa Magallanes, Fernando Olmedo Reguera and Pedro Marieluz Garces are martyrs of the seal of the confessional in the Catholic Church, choosing to die rather than violate the seal.