The Motion Picture Production Code was a set of industry guidelines for the self-censorship of content that was applied to most motion pictures released by major studios in the United States from 1934 to 1968. It is also popularly known as the Hays Code, after Will H. Hays, president of the Motion Picture Producers and Distributors of America (MPPDA) from 1922 to 1945. The code spelled out unacceptable content for motion pictures produced for a public audience in the United States, such as drugs, profanity, and sex. Under Hays's leadership, the MPPDA, later the Motion Picture Association of America (MPAA) and the Motion Picture Association (MPA), adopted the Production Code in 1930 and began rigidly enforcing it in 1934.
From 1934 to 1954, the code was closely associated with Joseph Breen, the administrator appointed by Hays to enforce the code in Hollywood. The film industry followed the guidelines set by the code well into the late 1950s, but it began to weaken, owing to the combined impact of television, influence from foreign films, controversial directors (such as Otto Preminger) pushing boundaries, and intervention from the courts, including the U.S. Supreme Court. In 1968, after several years of minimal enforcement, the Production Code was replaced by the MPAA film rating system.
Background
In the 1920s, Hollywood was rocked by a number of notorious scandals, such as the alleged rape and manslaughter of Virginia Rappe by popular movie star Roscoe "Fatty" Arbuckle and the murder of William Desmond Taylor, which brought widespread condemnation from religious, civic and political organizations. Many felt that the film industry had always been morally questionable, and political pressure was increasing, with legislators in 37 states introducing almost one hundred film censorship bills in 1921. In 1922, as they were faced with the prospect of having to comply with hundreds and potentially thousands of inconsistent, easily changed decency laws in order to show their films, the studios chose self-regulation as the preferable option, enlisting Presbyterian elder Will H. Hays, Postmaster General under former President Warren G. Harding and former head of the Republican National Committee, to rehabilitate Hollywood's image. The move mimicked the decision that Major League Baseball had made in hiring judge Kenesaw Mountain Landis as League Commissioner the previous year to quell questions about the integrity of baseball in the wake of the 1919 World Series gambling scandal; The New York Times even called Hays the "screen Landis". Hays was paid the lavish sum of $100,000 a year ($1.92 million in 2025), and served for 25 years as president of the Motion Picture Producers and Distributors of America (MPPDA), where he "defended the industry from attacks, recited soothing nostrums, and negotiated treaties to cease hostilities".

In 1924, Hays introduced a set of recommendations dubbed "the Formula", which the studios were advised to heed, and asked filmmakers to describe to his office the plots of films they were planning on producing. In 1915, the Supreme Court had decided unanimously in Mutual Film Corporation v. Industrial Commission of Ohio that free speech did not extend to motion pictures. While there had been token attempts to clean up the films before (such as when the studios formed the National Association of the Motion Picture Industry (NAMPI) in 1916), little had come of the efforts. New York became the first state to take advantage of the Supreme Court's decision by instituting a censorship board in 1921. Virginia followed suit the following year, with eight individual states having a board by the advent of sound film, but many of these were ineffectual. By the 1920s, the New York stage, a frequent source of subsequent screen material, had topless shows, performances filled with curse words, adult subject matter, and sexually suggestive dialogue. Early in the sound system conversion process, it became apparent that what was acceptable in New York might not be so in Kansas. Filmmakers were facing the possibility that many states and cities would adopt their own codes of censorship, necessitating a multiplicity of versions of films made for national distribution. Self-censorship was deemed a preferable outcome.
In 1927, Hays suggested to studio executives that they form a committee to discuss film censorship. Irving G. Thalberg of Metro-Goldwyn-Mayer, Sol Wurtzel of Fox Film Corporation, and E. H. Allen of Paramount Pictures responded by collaborating on a list they called the "Don'ts and Be Carefuls", based on items that were challenged by local censor boards. This list consisted of eleven subjects best avoided and twenty-six to be handled very carefully. The list was approved by the Federal Trade Commission (FTC), and Hays created the Studio Relations Committee (SRC) to oversee its implementation; however, there was still no way to enforce tenets. The controversy surrounding film standards came to a head in 1929.
Pre-Code
In a resolution passed on June 29, 1927, the MPPDA codified lists of "don'ts" and "be carefuls" into what they colloquially called their "Magna Charta". Many of these would later become key points in the Code.

Don'ts
"Those things which are included in the following list shall not appear in pictures produced by the members of this Association, irrespective of the manner in which they are treated":
Pointed profanity—by either title or lip—this includes the words God, Lord, Jesus, Christ (unless they be used reverently in connection with proper religious ceremonies), Hell, S.O.B., damn, Gawd, and every other profane and vulgar expression however it may be spelled;
Any licentious or suggestive nudity—in fact or in silhouette; and any lecherous or licentious notice thereof by other characters in the picture;

The illegal traffic in drugs;
Any inference of sex perversion;
White slavery;

Miscegenation;
Sex hygiene and venereal diseases;
Scenes of actual childbirth—in fact or in silhouette;

Children's sex organs;
Ridicule of the clergy;
Willful offense to any nation, race or creed;

Be Carefuls
"Special care [must] be exercised in the manner in which the following subjects are treated, to the end that vulgarity and suggestiveness may be eliminated and that good taste may be emphasized":
The use of the Flag;
International Relations (avoid picturizing in an unfavorable light another country's religion, history, institutions, prominent people and citizenry);
Religion and religious ceremonies;
Arson;
The use of firearms;
Theft, robbery, safe-cracking, and dynamiting of trains, mines, buildings, et cetera (having in mind the effect which a too-detailed description of these may have upon the moron);
Brutality and possible gruesomeness;
Technique of committing murder by whatever method;
Methods of smuggling;
Third-Degree methods;
Actual hangings or electrocutions as legal punishment for crime;
Sympathy for criminals;
Attitude toward public characters and institutions;
Sedition;
Apparent cruelty to children and animals;
Branding of people or animals;
The sale of women, or of a woman selling her virtue;
Rape or attempted rape;
First-night scenes;
Man and woman in bed together;
Deliberate seduction of girls;
The institution of marriage;
Surgical operations;
The use of drugs;
Titles or scenes having to do with law enforcement or law-enforcing officers;
Excessive or lustful kissing, particularly when one character or the other is a "heavy".
Creation
In 1929, Catholic layman Martin Quigley, editor of the prominent trade paper Motion Picture Herald, and Jesuit priest Father Daniel A. Lord, created a code of standards and submitted it to the studios. Lord was particularly concerned with the effects of sound film on children, whom he considered especially susceptible to their allure. In February 1930, several studio heads, including Irving Thalberg of Metro-Goldwyn-Mayer, met with Lord and Quigley. After some revisions, they agreed to the stipulations of the Code. One of the main motivating factors in adopting the Code was to avoid direct government intervention. It was the responsibility of the SRC (Studio Relations Committee, precursor to the PCA), headed by Colonel Jason S. Joy, a former American Red Cross Executive Secretary, to supervise film production and advise the studios when changes or cuts were required. On March 31, the MPPDA agreed it would abide by the Code. The production code was intended to put a limitation on films which were distributed to a large audience, making it more difficult to appeal to all individuals in the audiences.
Contents
The code was divided into two parts. The first was a set of "general principles" which prohibited a picture from "lowering the moral standards of those who see it", so as not to wrongly influence a specific audience of viewers including women, children, lower-class, and those of "susceptible" minds, called for depictions of the "correct standards of life", and lastly forbade a picture to show any sort of ridicule towards a law or "creating sympathy for its violation". The second part was a set of "particular applications", which was an exacting list of items that could not be depicted. Some restrictions, such as the ban on homosexuality or on the use of specific curse words, were never directly mentioned, but were assumed to be understood without clear demarcation. The Code also contained an addendum commonly referred to as the Advertising Code, which regulated advertising copy and imagery.
Homosexuals were de facto included under the proscription of sex perversion, and the depiction of miscegenation (by 1934, defined only as sexual relationships between black and white races) was forbidden. It also stated that the notion of an "adults-only policy" would be a dubious, ineffective strategy that would be difficult to enforce; however, it did allow that "maturer minds may easily understand and accept without harm subject matter in plots which does younger people positive harm". If children were supervised and the events implied elliptically, the code allowed "the possibility of a cinematically inspired thought crime".
The code sought not only to determine what could be portrayed on screen, but also to promote traditional values. Sexual relations outside marriage, which were forbidden to be portrayed as attractive or beautiful, were to be presented in a way that would not arouse passion or make them seem permissible. Any sexual act considered perverted, including any suggestion of same-sex relationships, sex or romance, was ruled out.
All criminal action had to be punished, and neither the crime nor the criminal could elicit sympathy from the audience, or the audience must at least be aware that such behavior is wrong, usually through "compensating moral value". Authority figures had to be treated with respect, and the clergy could not be portrayed as comic characters or villains. Under some circumstances, politicians, police officers, and judges could be villains, as long as it was clear that those individuals portrayed as villains were the exceptions to the rule.
The entire document was written with Catholic undertones, and stated that art must be handled carefully because it could be "morally evil in its effects", and its "deep moral significance" was unquestionable. It was initially decided to keep the Catholic influence on the Code secret. A recurring theme was "that throughout, the audience feels sure that evil is wrong, and good is right".
Enforcement
Pre-Code Hollywood
On February 19, 1930, Variety published the entire content of the Code, and predicted that state film censorship boards would soon become obsolete; however, the men obliged to enforce the code—Jason Joy (head of the committee until 1932) and his successor, James Wingate—were generally unenthusiastic and/or ineffective. The Blue Angel, the first film the office reviewed, which was passed by Joy with no revisions, was considered indecent by a California censor. Although there were several instances where Joy negotiated cuts from films and there were definite—albeit loose—constraints, a significant amount of lurid material made it to the screen. Joy had to review 500 films a year with a small staff and little power. He was more willing to work with the studios, and his creative writing skills led to his hiring at Fox. On the other hand, Wingate struggled to keep up with the flood of scripts coming in, to the point where Warner Bros.' head of production Darryl Zanuck wrote him a letter imploring him to pick up the pace. In 1930, the Hays office did not have the authority to order studios to remove material from a film, and instead worked by reasoning and sometimes pleading with them. Complicating matters, the appeals process ultimately put the responsibility for making the final decision in the hands of the studios.