Under article 293 of the Penal Code, publication of acts or proceedings designated as government secret by law or by a lawful executive decision is punishable with a fine (10,000 CHF maximum), unless there is an overriding private or public interest.
The article was controversial for several decades and various reforms and repeal proposals were debated. Before 2007, the law also allowed a short detention (up to three months) as punishment. This was not a specific amendment to the article; short detentions (which were anyway not used much by then) were abolished for all crimes and replaced generally by a fine or a day-fine (fine technically convertible to specific number of days in imprisonment). The law was finally reformed in 2018, adding the exception of public or private interest, under pressure from the developing jurisprudence in the Federal Court and European Court of Human Rights.
Under the provision before 2018, a formal secrecy classification suffices for a conviction, though the judge may waive any penalty if the classified material is of minor importance. Under the current provision, the court must balance between the government interest and the public interest represented by the journalist, and substantive aspects of the document will be considered to a greater extent.
In any case, journalists are nonetheless protected from being forced to reveal their sources, unless it is necessary to avoid an immediate danger or prosecute an important offence (homicide, sexual abuse of children, other offences with a minimum imprisonment of three years or more; publishing government secret is not one of the exceptional offences); see article 28a.
Example
Martin Stoll was a journalist writing for Sonntags-Zeitung and published an article on a secret diplomatic document from the Swiss ambassador to the U.S. regarding the negotiations between Swiss banks and Holocaust survivors in 1997.
He was charged under article 293 and was convicted and fined 4,000 CHF (reduced to 800 CHF on appeal). The Federal Supreme Court affirmed the conviction.
Stoll filed a case against Switzerland in ECHR, who in 2007 affirmed the lawfulness of the provision, but indicated a balance of interests will always be necessary for any punishment.
The decision pushed the Swiss government to reform the provision, with the Federal Council affirming its willingness in 2008 and the adoption into law by Parliament in 2016.
Other provisions limiting freedom of press in Switzerland
Though generally respectful of human rights and having no journalist-specific legal regulations, Switzerland still has laws that may interfere with the freedom of press, sometimes to an extent that many may find uncomfortable with.
Like many European countries, Swiss law protects the privacy of certain information related to children, persons accused of crimes, victims of crimes and witnesses in legal proceedings; though not all protections are by way of criminal law, a civil action of defamation (or similar claims arising from personality rights) is of concern most of the time for journalists.
One controversial criminal provision (art. 47 al. 1 let. c of the Bank Act) was adopted in 2015 in relation to banking secrecy, as Switzerland is famous for. It is an offence to divulge any information obtained in violation of banking secrecy, even for journalists, with a penalty up to three years (or five years if the information is used for profit). No specific public interest exception is provided. Only overriding public interest may be a defence of necessity under general criminal law.
For this reason, Swiss media was forced to refrain from investigating the Credit Suisse leak in cooperation with their usual international partners in 2022.