This article possibly contains original research. (March 2010)
A happy ending is an ending of the plot of a work of fiction in which almost everything turns out for the best for the main protagonists and their sidekicks, while the main villains/antagonists are dead/defeated.
In storylines where the protagonists are in physical danger, a happy ending mainly consists of their survival and successful completion of the quest or mission; where there is no physical danger, a happy ending may be lovers consummating their love despite various factors which might have thwarted it. A considerable number of storylines combine both situations. In Steven Spielberg's version of "War of the Worlds", the happy ending consists of three distinct elements: The protagonists all survive the countless perils of their journey; humanity as a whole survives the alien invasion; and the protagonist father regains the respect of his estranged children. The plot is so constructed that all three are needed for the audience's feeling of satisfaction in the end.
A happy ending is epitomized in the standard fairy tale ending phrase, "happily ever after" or "and they lived happily ever after". (One Thousand and One Nights has the more restrained formula "they lived happily until there came to them the One who Destroys all Happiness" (i.e. Death); likewise, the Russian versions of fairy tales typically end with "they lived long and happily, and died together on the same day".) Satisfactory happy endings are happy for the reader as well, in that the characters they sympathize with are rewarded. However, this can also serve as an open path for a possible sequel. For example, in the 1977 film Star Wars, Luke Skywalker defeats the Galactic Empire by destroying the Death Star; however, the story's happy ending has consequences that follow in 1980's The Empire Strikes Back that are reversed in 1983's Return of the Jedi. The concept of a permanent happy ending is specifically brought up in the Stephen King fantasy/fairy tale novel The Eyes of the Dragon which has a standard good ending for the genre, but simply states that "there were good days and bad days" afterwards.
A happy ending only requires that the main characters be all right. Millions of innocent background characters can die, but as long as the characters that the reader/viewer/audience cares about survive, it can still be a happy ending. Roger Ebert comments in his review of Roland Emmerich's The Day After Tomorrow: "Billions of people may have died, but at least the major characters have survived. Los Angeles is leveled by multiple tornadoes, New York is buried under ice and snow, the United Kingdom is flash-frozen, and much of the Northern Hemisphere is wiped out for good measure. Thank god that Jack, Sam, Laura, Jason and Dr. Lucy Hall survive, along with Dr. Hall's little cancer patient."
The presence of a happy ending is one of the key points that distinguish melodrama from tragedy. In certain periods, the endings of traditional tragedies such as Macbeth or Oedipus Rex, in which most of the major characters end up dead, disfigured, or discountenanced, have been actively disliked. In the seventeenth century, the Irish author Nahum Tate sought to improve William Shakespeare's King Lear in his own heavily modified version in which Lear survives and Cordelia marries Edgar. Tate's version dominated performances for a century and a half and Shakespeare's original was nearly forgotten. Both David Garrick and John Philip Kemble, while taking up some of Shakespeare's original text, kept Tate's happy ending. Edmund Kean played King Lear with its tragic ending in 1823, but failed and reverted to Tate's crowd-pleaser after only three performances. Only in 1838 did William Macready at Covent Garden successfully restore Shakespeare's original tragic end – Helen Faucit's final appearance as Cordelia, dead in her father's arms, became one of the most iconic of Victorian images and the play's tragic end was finally accepted by the general public. Most subsequent critics have not found Tate's amendments an improvement, and welcomed the restoration of Shakespeare's original. Happy endings have also been fastened – equally, with no lasting success – to Romeo and Juliet and Othello.
There is no universally accepted definition of what a happy ending is; such definitions can considerably vary with time and cultural differences. An interpretation of The Merchant of Venice's forced conversion of Shylock to Christianity is that it was intended as a happy ending. As a Christian, Shylock could no longer impose interest, undoing his schemes in the play and ending the rivalry between him and Antonio, but more important, contemporary audiences would see becoming a Christian as a means to save his soul (cf. Romans 11:15). In later times, Jews (and non-Jewish opponents of anti-Semitism) strongly objected to that ending, regarding it as depicting a victory for injustice and oppression and as pandering to the audience's prejudices.
Similarly, for sixteenth-century audiences, the ending of The Taming of the Shrew – a formerly independent and assertive woman being broken and becoming totally submissive to her husband – might have counted as a happy ending, which it would not under present-day standards of women's place in society (see The Taming of the Shrew#Sexism controversy).
Most interpretations of the legend of Don Juan end with the protagonist rake being dragged off to Hell, in just retribution for his many sins (for example, the ending of Mozart's Don Giovanni). However, José Zorrilla – whose 1844 play Don Juan Tenorio is the version most well-known in the Spanish-speaking world – believed that a story should never end sadly, and must always have a happy ending. In Zorrilla's depiction, Don Juan is saved at the last moment from the flames of Hell by the selfless pure love of Doña Inés, a woman whom he wronged but who forgave him; she had made a deal with God to offer her own blameless soul on behalf of Don Juan's, thus redeeming Don Juan and taking him with her to Paradise.
The Octoroon, an 1859 anti-slavery play by Dion Boucicault, focuses on the tragic love between the white George Peyton and the Octoroon girl Zoe. Her one-eighth Black ancestry is enough to prevent their marrying. In the American society of the time, it would have been unacceptable to present a play ending with a mixed-race couple consummating their love. Rather, the play ends with Zoe taking poison and dying, the grief-stricken George at her side. However, when the play was performed in England, where prejudice was less strong, it was given a happy ending, culminating with the young lovers happily getting together against all odds.
In 17th Century Italy, Francesco Cavalli wrote the opera Didone, based on Virgil's Aeneid (Book 4 in particular) and set to a libretto by Giovanni Francesco Busenello. However, Busenello's libretto changed the tragic ending provided by Virgil, in which Dido commits suicide after Aeneas abandons her. In Busenello's version Iarbas, King of the Getuli, shows up in the nick of time to save Dido from herself, and she ends up happily marrying him.
Fifty years later, Tomaso Albinoni wrote the opera Zenobia, regina de’ Palmireni (Zenobia, Queen of the Palmyrans) - loosely based on the historical life of the Third-Century Queen Zenobia of Palmyra, who for many years defied the might of the Roman Empire until finally overcome by the armies of the Roman Emperor Aurelian. She was overthrown and taken captive to Rome, and her kingdom summarily annexed to the Roman Empire. However, Albinoni changed the historical ending of Zenobia's drama. In Albinoni' ending, after various plot twists the magnanimous Aurelian becomes impressed with Zenobia's honesty and integrity, and restores her to her throne.
Tchaikovsky's ballet Swan Lake, as originally presented in 1895, ends tragically with the lovers Odette and Siegfried dying together, vowing fidelity unto death to each other. However, under the Soviet regime, in 1950 Konstantin Sergeyev, who staged a new Swan Lake for the Mariinsky Ballet (then the Kirov), replaced the tragic ending with a happy one, letting the lovers survive and live happily ever after. Similar changes to the ending of Swan Lake were also made in various other times and places where it was presented (see Swan Lake#Alternative endings).
A Times review of The Spy Who Came in from the Cold strongly criticized John le Carré for failing to provide a happy ending, and gave unequivocal reasons why in the reviewer's opinion (shared by many others) such an ending is needed: "The hero must triumph over his enemies, as surely as Jack must kill the giant in the nursery tale. If the giant kills Jack, we have missed the whole point of the story."
George Bernard Shaw had to wage an uphill struggle against audiences, as well as some critics, persistently demanding that his Pygmalion have a happy ending, i.e. that Professor Higgins and Eliza Doolittle would ultimately marry. To Shaw's great chagrin, Herbert Beerbohm Tree who presented the play in London's West End in 1914 had sweetened the ending and told Shaw: "My ending makes money; you ought to be grateful. Your ending is damnable; you ought to be shot." The irritated Shaw added a postscript essay, "'What Happened Afterwards", to the 1916 print edition, for inclusion with subsequent editions, in which he explained precisely why in his view it was impossible for the story to end with Higgins and Eliza marrying. Nevertheless, audiences continued wanting a happy ending also for later adaptations such as the musical and film My Fair Lady. As seen in one of his preserved notes, Shaw wanted the play to end with Eliza becoming independent and assertive and shaking off Higgins' tutelage: "When Eliza emancipates herself – when Galatea comes to life – she must not relapse". This might have made it a happy ending from the point of view of present day feminism. In 1938, Shaw sent Gabriel Pascal, who produced that year's film version, a concluding sequence which he felt offered a fair compromise: a tender farewell scene between Higgins and Eliza, followed by one showing Freddy and Eliza happy in their greengrocery-flower shop; this would have been a happy end from the point of view of Freddy, who in other versions is left trapped in hopeless unrequited love for her. However, Pascal did not use Shaw's proposed ending, opting for a slightly ambiguous final scene in which Eliza returns to Higgins' home, leaving open how their relationship would develop further. Several decades later, My Fair Lady had a similar ending.
The Sherlock Holmes novel The Sign of Four included, in addition to the normal detective plot, also an important romantic plot line. While investigating the book's mystery, Dr. Watson - Holmes' faithful companion - falls in love with the client, Mary Morstan, and by the ending she consents to marry him. A fairly conventional and satisfying happy ending, which worked well for The Sign of Four. However, Watson getting into matrimonial bliss with his Mary proved cumbersome for the normal format of the Sherlock Holmes stories in general, which involved Holmes and Watson setting out on a new adventure at a moment's notice. With Watson no longer sharing quarters with Holmes on Baker Street but having his own married home, a new adventure needed to begin with Holmes barging into the Watson family home and taking Watson off to an adventure after apologizing to Mrs. Watson for "borrowing" her husband. Rather than having to regularly initiate stories with such scenes, Conan Doyle summarily killed off Watson's wife. In The Adventure of the Norwood Builder Watson is seen back in his old Baker Street quarters and the readers are told that his wife had died some time before; the circumstances of her death were never told, nor were readers given a chance to share the widowed Watson's grief in the direct aftermath. Readers accepted Mary's death without serious demur, though in Sign of Four she had been a sympathetic and likeable character. In Sherlock Holmes stories, a happy ending usually consisted of Holmes solving the mystery with Watson's help and the criminal turned over to the police (or, in some cases, Holmes magnanimously lets him go), and readers were satisfied with that. However, when Conan Doyle attempted to kill off Homes himself, at the tragic ending of The Final Problem, readers refused to accept this ending, made strong and vociferous protests, and eventually forced the author to bring Holmes back to life.
Science fiction writer Robert Heinlein published the Future History, a series of stories attempting to depict the future of humanity (particularly, of the United States). Heinlein's plan included the writing of two interlinked novellas set in the Twenty-First Century (then a distant future time). The first would have depicted a charismatic preacher named Nehemiah Scudder getting himself elected President of The United States, seizing dictatorial power and establishing a tyrannical theocracy which would last to the end of his life and several generations after; the second - depicting the successful revolution which finally brings down the theocracy and restores democracy. In fact, as Heinlein explained to his readers, he found himself unable to write in full the first part - which would have been "too depressing", ending as it had to with the villain's total victory. Rather, Heinlein contented himself with a brief summary describing Scudder's rise, prefacing the novella If This Goes On— which ends happily with the overthrow of the theocracy and the restoration of a democratic regime.
In another Heinlein work, Podkayne of Mars, the author's original text ended tragically. The book's eponymous protagonist, an interplanetary adventuring teenage girl, flees the scene of an impending nuclear blast in the swamps of Venus, only to remember that an extraterrestrial baby was left behind. She goes back and gets killed in the blast, saving the baby by shielding it with her own body. This ending did not please Heinlein's publisher, who demanded and got a rewrite over the author's bitter objections. In a letter to Lurton Blassingame, his literary agent, Heinlein complained that it would be like "revising Romeo and Juliet to let the young lovers live happily ever after." He also declared that changing the end "isn't real life, because in real life, not everything ends happily." Despite his objections, Heinlein had to give in and when first published in 1963, the book had an amended ending, in which Podkayne survives though needing prolonged hospitalization. Heinlein, however, did not give up. At his insistence, the 1993 Baen edition included both endings (which differ only on the last page) and featured a "pick the ending" contest, in which readers were asked to submit essays on which ending they preferred. The 1995 edition included both endings, Jim Baen's own postlude to the story, and twenty-five of the essays. The ending in which Podkayne dies was declared the winner. Among the reasons why readers favored this ending were that they felt Heinlein should have been free to create his own story, and also that they believed the changed ending turned a tragedy into a mere adventure, and not a very well constructed one at that. This restored tragic ending has appeared in all subsequent editions.
A basic theme of Joe Haldeman's The Forever War is the protagonist being trapped in a centuries-long, futile space war. While remaining young due to traveling at relativistic speeds, he feels a growing alienation as human society is changing and becoming increasingly strange and incomprehensible to him. For example, he is appointed as the commanding officer of a "strike force" whose soldiers are exclusively homosexual, and who resent being commanded by a heterosexual. Later in the book, he finds that while he was fighting in space, humanity has begun to clone itself, resulting in a new, collective species calling itself simply Man. Luckily for the protagonist, Man has established several colonies of old-style, heterosexual humans, just in case the evolutionary change proves to be a mistake. In one of these colonies, the protagonist is happily reunited with his long-lost beloved and they embark upon monogamous marriage and on having children through sexual reproduction and female pregnancy – an incredibly archaic and old-fashioned way of life for most of that time's humanity, but very satisfying for that couple.
A central element in The Black Magician trilogy by Trudi Canavan is the developing relations of protagonist Sonea with the powerful magician Akkarin. At first she is frightened and distrustful of him, then she grows to understand his motivations and share his difficult and dangerous struggle - culminating with the two of them falling very deeply in love with each other. However, at the end of the final part, The High Lord, Akkarin sacrifices himself, giving all his power to Sonea and dying so that she could defeat their enemies, the evil Ichani. The grieving Sonea is left to bear Akkarin's child and carry on his magical work as best she can. Many readers were shocked by this ending. To repeated queries on why Akkarin had to die, Canavan answered "When the idea came to me for this final scene I knew I had a story worth giving up full time work to write, because at the time I was utterly sick of books where all the characters are alive and happily shacked up with a love interest by the end. If characters died it was in some expected way that left you feeling warm and fuzzy about their ‘sacrifice’. Death shouldn't leave you feeling warm and fuzzy. Akkarin was a casualty of war. War is a cruel and random killer. It doesn't kill based on who deserves it more or less. And, hey, you're never going to forget that ending!". However, many of the fans refused to accept Akkarin's death as final. A fan identifying herself as RobinGabriella wrote and posted an alternate ending letting Akkarin live: "The ending I really wanted but never got. Akkarin lives! This is for all you people who wanted Sonea to be happy at long last , wanted a happy ending, or just wanted Akkarin for yourselves. Enjoy!" 
In numerous cases, Hollywood studios adapting literary works into film added a happy ending which did not appear in the original.
- Mary Shelley's 1818 novel, Frankenstein, ended with the deaths of Victor Frankenstein and Elizabeth Lavenza. In the 1931 film adaption they survive and marry.
- C. S. Forester's 1935 novel The African Queen has a British couple, stranded in Africa during the First World War, hatch a plot to sink a German gunboat; they make an enormous, dedicated struggle, with boundless effort and sacrifice, but at the last moment their quest ends with failure and futility. In the 1951 film adaptation they succeed, and get to see the German boat sink (just in time to save them from being hanged by the Germans).
- Truman Capote's 1958 novella Breakfast at Tiffany's ended with the main character, Holly Golightly, going her own solitary way and disappearing from the male protagonist's life. In the 1961 film made on its base she finally accepts the love he offers her and the film ends with their warmly embracing, oblivious of a pouring rain.
- Hans Christian Andersen's fairy tale The Little Mermaid ends with the protagonist mermaid making a noble sacrifice, resigned to seeing her beloved prince marrying another woman. She is, however, unexpectedly rewarded for the sacrifice by the chance to earn herself an immortal soul by further good deeds in air-spirit form. As written by Andersen, acquiring an immortal soul had been her main objective from the start, with the prince chiefly a means to this end, and thus Andersen may have meant this as a "spiritual happy ending". However, the 1989 Disney adaptation paid much less attention to the spiritual aspect and focused on the love interest, and they replaced Andersen's ending and presented the American public with a less subtle one and more conventional ending: the mermaid does get to happily marry her prince. Disney later added a sequel, obviously impossible for the Andersen original, focused on the child born of that marriage.
- Herman Wouk's novel Marjorie Morningstar ends with the formerly vibrant protagonist giving up her dreams of an artistic career, marrying a mediocre middle-class man approved by her parents and becoming totally reconciled to the commonplace life of a suburban housewife and mother. In her review for Slate Magazine, Alana Newhouse wrote that "most female readers cry when they reach the end of this book, and for good reason. Marjorie Morningstar, as they came to know her, has become another woman entirely"; Newhouse expressed the opinion that an adaptation to a film or a stage play which would keep the book's ending "would not run for a week". But the makers of the film version did change the ending, letting Marjorie end up in the loving arms of a talented, sensitive and warm-hearted playwright – whom she unwisely rejected in the book, and who in the film version can be expected to encourage and support her in launching her own artistic career.
- George Orwell's Nineteen Eighty-Four has a particularly harsh ending, with the protagonists Winston and Julia being totally broken by the totalitarian state against which they tried to rebel, their subversive "criminal thoughts" driven out of their minds and being forced to betray each other and destroy their love for each other. The 1956 adaptation had two alternate endings made. One, faithful to the Orwell original, ended with a rehabilitated and brainwashed Winston fervently joining the crowd cheering "Long live Big Brother!". The alternate ending had Winston rebelling against his brainwashing and starting to shout, "Down with Big Brother", whereupon he is shot down. Julia runs to his aid and suffers the same fate. Clearly, the theme of two individuals waging a foredoomed rebellion against an all-powerful oppressive state effectively precluded the option of so radically changing the ending as to let them live "happily ever after". The maximum realistic change was to create a "moral happy end", letting Winston and Julia keep their integrity and dignity and die as martyrs.
- Comedy (drama), which in ancient and medieval times meant a humorous play with a happy ending
- Once upon a time
- Shai Rudin, Happily Ever After? Story Endings in Hebrew Children's Literature, New Review of Children's Literature and Librarianshiphttp://www.tandfonline.com/toc/rcll20/current
- Ebert's review of The Day After Tomorrow
- How to End "The Octoroon", John A. Degen, Educational Theatre Journal, Vol. 27, No. 2 (May 1975), pp. 170–178; The Octoroon Archived 2007-11-17 at the Wayback Machine
- The Times, September 13, 1968.
- Evans, T.F. (ed.) (1997). George Bernard Shaw (The Critical Heritage Series). ISBN 0-415-15953-9, pp. 223–30.
- "From the Point of View of A Playwright," by Bernard Shaw, collected in Herbert Beerbohm Tree, Some Memories of Him and His Art, Collected by Max Beerbohm (1919). London: Hutchinson. Versions at Text Archive Internet Archive
- Shaw, Bernard, edited by Dan H. Laurence. Collected Letters vol. III: 1911–1925.
- Shaw, G.B. (1916). Pygmalion. New York: Brentano. Sequel: What Happened Afterwards. Bartleby: Great Books Online.
- "The Instinct of An Artist: Shaw and the Theatre." Catalog for "An Exhibition from The Bernard F. Burgunder Collection," 1997. Cornell University Library
- "The High Lord Spoiler Questions and Answers" on Trudi Canavan's website 
- "The High Lord Alternate Ending - Akkarin lives" by RobinGabriella