Fiction
Depictions of rats in fiction are historically inaccurate and negative. The most common falsehood is the squeaking almost always heard in otherwise realistic portrayals (i.e. nonanthropomorphic). While the recordings may be of actual squeaking rats, the noise is uncommon – they may do so only if distressed, hurt, or annoyed. Normal vocalizations are very high-pitched, well outside the range of human hearing. Rats are also often cast in vicious and aggressive roles when in fact, their shyness helps keep them undiscovered for so long in an infested home.
The actual portrayals of rats vary from negative to positive with a majority in the negative and ambiguous. The rat plays a villain in several mouse societies; from Brian Jacques's Redwall and Robin Jarvis's The Deptford Mice, to the roles of Disney's Professor Ratigan and Kate DiCamillo's Roscuro and Botticelli. They have often been used as a mechanism in horror; being the titular evil in stories like James Herbert's The Rats or H.P. Lovecraft's "The Rats in the Walls", in films like Willard and Ben, or both Stephen King's "Graveyard Shift" and its film adaptation. Another terrifying use of rats is as a method of torture, for instance in Room 101 in George Orwell's Nineteen Eighty-Four or The Pit and the Pendulum by Edgar Allan Poe.
Selfish helpfulness—those willing to help for a price—has also been attributed to fictional rats. Templeton, from E. B. White's Charlotte's Web, repeatedly reminds the other characters that he is only involved because it means more food for him, and the cellar-rat of John Masefield's The Midnight Folk requires bribery to be of any assistance.
By contrast, the rats appearing in the Doctor Dolittle books tend to be highly positive and likeable characters, many of whom tell their remarkable life stories in the Mouse and Rat Club established by the animal-loving doctor. In The Underland Chronicles series, rats are both allies (such as Ripred) and enemies (such as Bane, and King Gorger).
Some fictional works use rats as the main characters. Notable examples include the society created by O'Brien's Mrs. Frisby and the Rats of NIMH, and others include Doctor Rat, and Rizzo the Rat from The Muppets. Pixar's 2007 animated film Ratatouille is about a rat described by Roger Ebert as "earnest... lovable, determined, [and] gifted" who lives with a Parisian garbage-boy-turned-chef.
Mon oncle d'Amérique ("My American Uncle"), a 1980 French film, illustrates Henri Laborit's theories on evolutionary psychology and human behaviors by using short sequences in the storyline showing lab rat experiments.
In Harry Turtledove's science fiction novel Homeward Bound, humans unintentionally introduce rats to the ecology at the home world of an alien race which previously invaded Earth and introduced some of its own fauna into its environment. A. Bertram Chandler pitted the space-bound protagonist of a long series of novels, Commodore Grimes, against giant, intelligent rats who took over several stellar systems and enslaved their human inhabitants. "The Stainless Steel Rat" is nickname of the (human) protagonist of a series of humorous science fiction novels written by Harry Harrison.
Wererats, therianthropic creatures able to take the shape of a rat, have appeared in the fantasy or horror genre since the 1970s. The term is a neologism coined in analogy to werewolf. The concept has since become common in role-playing games like Dungeons & Dragons and fantasy fiction like the Anita Blake series.
One of the oldest and most historic stories about rats is "The Pied Piper of Hamelin", in which a rat-catcher leads away an infestation with enchanted music. The piper is later refused payment, so he in turn leads away the town's children. This tale, traced to Germany around the late 13th century, has inspired adaptations in film, theatre, literature, and even opera. The subject of much research, some theories have intertwined the tale with events related to the Black Plague, in which black rats played an important role. Fictional works based on the tale that focus heavily on the rat aspect include Terry Pratchett's The Amazing Maurice and His Educated Rodents, and Belgian graphic novel Le Bal du Rat Mort (The Ball of the Dead Rat). Furthermore, a linguistic phenomenon when a wh-expression drags with it an entire encompassing phrase to the front of the clause has been named pied-piping after "Pied Piper of Hamlin".