Comic fantasy is a subgenre of fantasy that is primarily humorous in intent and tone. Usually set in imaginary worlds, comic fantasy often includes puns on and parodies of other works of fantasy. It is sometimes known as low fantasy in contrast to high fantasy, which is primarily serious in intent and tone. The term "low fantasy" is used to represent other types of fantasy, however, so while comic fantasies may also correctly be classified as low fantasy, many examples of low fantasy are not comic in nature.
The subgenre rose in the nineteenth century. Elements of comic fantasy can be found in such nineteenth century works as some of Hans Christian Andersen's fairy tales, Charles Dickens' "Christmas Books", and Lewis Carroll's Alice books. The first writer to specialize in the sub-genre was "F. Anstey" in novels such as Vice Versa (1882), where magic disrupts Victorian society with humorous results. Anstey's work was popular enough to inspire several imitations, including E. Nesbit's light-hearted children's fantasies, The Phoenix and the Carpet (1904) and The Story of the Amulet (1906). The United States had several writers of comic fantasy, including James Branch Cabell, whose satirical fantasy Jurgen, A Comedy of Justice (1919) was the subject of an unsuccessful prosecution for obscenity. Another American writer in a similar vein was Thorne Smith,whose works (such as Topper and The Night Life of the Gods) were popular and influential, and often adapted for film and television. Humourous fantasies narrated in a "gentleman's club" setting are common; they include John Kendrick Bangs' A Houseboat on the Styx (1895), Lord Dunsany's "Jorkens" stories, and Maurice Richardson's The Exploits of Englebrecht (1950). 
According to Lin Carter, T. H. White's works exemplify comic fantasy, L. Sprague de Camp and Fletcher Pratt's Harold Shea stories are early exemplars. The overwhelming bulk of de Camp's fantasy was comic. Pratt and de Camp were among several contributors to Unknown Worlds, a pulp magazine which emphasized fantasy with a comedic element. The work of Fritz Leiber also appeared in Unknown Worlds, including his Fafhrd and the Gray Mouser stories, a jocose take on the sword and sorcery subgenre.
In more modern times, Piers Anthony's Xanth books, Robert Asprin's MythAdventures of Skeeve and Aahz books, Terry Pratchett's Discworld, and Tom Holt's books provide good examples, as do many of the works by Christopher Moore. There are also comic-strips/graphic novels in the humorous fantasy genre, including Chuck Whelon's Pewfell series and the webcomics 8-Bit Theater and The Order of the Stick. Other recent authors in the genre include Toby Frost, Stuart Sharp, Nicholas Andrews, and DC Farmer, and the writing team of John P. Logsdon and Christopher P. Young.
- "Humourous Fantasy" in David Pringle,ed, The Ultimate Encyclopedia of Fantasy, (pp.31-33). London, Carlton,2006. ISBN 1-84442-110-4
- Edgar MacDonald, "James Branch Cabell" in E. F. Bleiler, ed.Supernatural Fiction Writers (pp. .789-796).New York: Scribner's, 1985. ISBN 0-684-17808-7
- Keith Neilson, "Thorne Smith" in Bleiler, ed.Supernatural Fiction Writers. (pp. 805-812),1985.
- David Langford, "Humor", in The Greenwood Encyclopedia of Science Fiction and Fantasy: Themes, Works, and Wonders. Greenwood Publishing Group, 2005 ISBN 0313329516, (p.401-404).
- Lin Carter, ed. Kingdoms of Sorcery, p 121–2. Doubleday and Company Garden City, NY, 1976.
- Carter. Kingdoms of Sorcery.