Fantasy literature is the body of written works that employ the motifs, themes, and stylistic approaches expected in the fantasy genre. Historically, most works of fantasy were written pieces of literature. Since the 1960s, a growing segment of the fantasy genre has taken the form of films, television programs, graphic novels, video games, music and painting.
Stories involving paranormal magic and terrible monsters have existed in spoken forms before the advent of printed literature. Homer's Odyssey satisfies the definition of the fantasy genre with its magic, gods, heroes, adventures and monsters. Fantasy literature as a distinct type emerged in Victorian times, with the works of writers such as Mary Shelley, William Morris and George MacDonald.
J. R. R. Tolkien played a large role in the popularization and accessibility of the fantasy genre with his highly successful publications The Hobbit (1937) and The Lord of the Rings (1954–55). Rarely does one consider modern fantasy without conjuring the memory and image of Tolkien and his creations. Tolkien was largely influenced by an ancient body of Anglo-Saxon myths, particularly Beowulf, as well as modern works such as The Worm Ouroboros by E. R. Eddison. Tolkien's close friend C. S. Lewis, author of The Chronicles of Narnia and a fellow English professor with a similar array of interests, also helped to publicize the fantasy genre.
The tradition established by these predecessors of the late nineteenth and early twentieth centuries has continued to thrive and be adapted by new authors. The influence of J.R.R. Tolkien's fiction has—particularly over the genre of high fantasy—prompted backlash. Works of metafictional fantasy were published in the twentieth century, making reference to the history and literary conventions of the genre, such as Terry Pratchett's Discworld series or Neil Gaiman's Stardust and The Problem of Susan. At the turn of the millennium, the Harry Potter novels of J. K. Rowling achieved widespread popularity.
Though it is not uncommon for fantasy novels to be ranked on The New York Times Best Seller list, to date the only fantasy novelists whose works have debuted at number one on the list are Robert Jordan in 1998, 2000, 2003, and 2005, Robert Jordan/Brandon Sanderson in 2009, 2010, and 2013, Brandon Sanderson in 2014, George R. R. Martin in 2005, and 2011, Neil Gaiman in 2005, and 2013, Terry Goodkind in 2006 and Patrick Rothfuss in 2011.
Fantasy has been distinguished from other forms of literature by its style and its freedom of expression wherein an author has the ability to use any story-telling element to strengthen the narrative; whether it be dragons, magic and castles or the lack thereof. Authors often engage in worldbuilding, constructing a framework or entire world against which the narrative plays out.
Symbolism often plays a significant role in fantasy literature, often through the use of archetypal figures inspired by earlier texts or folklore. Some argue that fantasy literature and its archetypes fulfill a function for individuals and society and the messages are continually updated for current societies.
Ursula K. Le Guin, in her essay "From Elfland to Poughkeepsie", presented the idea that language is the most crucial element of high fantasy, because it creates a sense of place. She analyzed the misuse of a formal, "olden-day" style, saying that it was a dangerous trap for fantasy writers because it was ridiculous when done wrong. She warns writers away from trying to base their style on that of masters such as Lord Dunsany and E. R. Eddison, emphasizing that language that is too bland or simplistic creates the impression that the fantasy setting is simply a modern world in disguise, and presents examples of clear, effective fantasy writing in brief excerpts from Tolkien and Evangeline Walton.
Michael Moorcock observed that many writers use archaic language for its sonority and to lend color to a lifeless story. Brian Peters writes that in various forms of fairytale fantasy, even the villain's language might be inappropriate if vulgar.
At the turn of the millennium, the Harry Potter young adult urban fantasy novels of J. K. Rowling achieved widespread popularity, combining fantasy with the gritty realism of coming of age, prejudice, the loss of innocence, impending war, self-identity, political corruption, death, depression, love, loss, and discrimination. Rowling juxtaposed gritty imagery and emotion with fantastical/whimsical elements in order to highlight the life that Harry could never have. The fantastical details of the series fade away by the third installment, revealing that the wizarding community of the Harry Potter books is just as bad, if not worse, than the non-magic community. Rowling's novels, while highly lyrical at times, are also grittier and more contemporarily written than the typical fantasy novel, and progress in maturity, not only book to book, but within each installment, going from the childhood innocence and veiled darkness of the beginnings of the first installment, to the pervasively dark and bleak, emotionally-charged, and graphically violent end of the 7th installment, which deconstructs and subverts the Hero's journey, and casts the story in a tonal shade of gray. In the wake of the series' massive financial and cultural success, several popular young adult fantasy books and series emerged, including Suzanne Collins' The Hunger Games trilogy, Christopher Paolini's Inheritence series, and Percy Jackson and the Olympians by Rick Riordan, each featuring similarly young heroes in fantastical circumstances.
Farah Mendlesohn argues the world of fantasy literature is broken up into four categories: the portal quest, the immersive, the intrusive, and the liminal. How the fantastic enters the narrated world is what determines how a story fits into these categories.
In a portal quest such as C.S. Lewis' The Chronicles of Narnia: The Lion, The Witch, and The Wardrobe (1950), readers are invited into the world of the fantastic.
In the intrusion fantasies like Bram Stoker's Dracula (1897), the fantastic invades the fictional world.
With liminal fantasy, for example Phillip Pullman’s His Dark Materials: The Subtle Knife (1997), the magic hovers just out of sight.
As for immersive fantasy, J.R.R. Tolkien's The Hobbit (1937) for example, allows the reader no escape from the fantastic.