Cozy mysteries, also referred to simply as "cozies," are a subgenre of crime fiction in which sex and violence are downplayed or treated humorously, and the crime and detection take place in a small, socially intimate community. The term was first coined in the late 20th century when various writers produced work in an attempt to re-create the Golden Age of Detective Fiction.
The detectives in such stories are nearly always amateurs (village policeman Hamish Macbeth, featured in a series of novels by M. C. Beaton, is a notable exception) and frequently women. They are typically well educated, intuitive, and often hold jobs (caterer, innkeeper, librarian, teacher, dog trainer, shop owner, reporter) that bring them into constant contact with other residents of their town and the surrounding region. Like other amateur detectives, they typically have a contact on the police force who can give them access to important information about the case at hand, but the contact is typically a spouse, lover, friend or family member rather than a former colleague. Dismissed by the authorities in general as nosy busybodies (particularly if they are middle-aged or elderly women), the detectives in cozy mysteries are thus left free to eavesdrop, gather clues, and use their native intelligence and intuitive "feel" for the social dynamics of the community to solve the crime.
The murderers in cozies are typically neither psychopaths nor serial killers, and, once unmasked, are usually taken into custody without violence. They are generally members of the community where the murder occurs, able to hide in plain sight, and their motives—greed, jealousy, revenge—are often rooted in events years, or even generations, old. The murderers are typically rational and often highly articulate, enabling them to explain, or elaborate on, their motives after their unmasking.
The supporting characters in cozy mysteries are often very broadly drawn and used as comic relief. The accumulation of such characters in long-running cozy mystery series, such as those of Charlotte MacLeod, frequently creates a stock company of eccentrics, among whom the detective stands out as the most (perhaps only) truly sane person.
Cozies virtually never dwell on sexuality or violence, or employ any but the mildest profanity. The murders take place off stage, and frequently involve relatively bloodless methods such as poisoning and falls from great heights. The wounds inflicted on the victim are never dwelt on, and seldom used as clues. Sexual activity, even between married characters, is only ever gently implied and never directly addressed, and the subject is frequently avoided altogether.
The cozy mystery usually takes place in a town, village, or other community small (or otherwise insular) enough to make it believable that all the principal characters know, and may well have long-standing social relationships with, each other. The amateur detective is usually a gregarious, well-liked individual who is able to get the community members to talk freely about each other. There is usually at least one very knowledgeable, nosy, yet reliable character in the book who is intimately familiar with the personal history and interrelationships of everyone in the town, and whose ability to fill in the blanks of the puzzle enables the amateur detective to solve the case.
Cozy mystery series frequently have a prominent thematic element introduced by the detective's job or hobby. Diane Mott Davidson's cozies, for example, revolve around cooking, Parnell Hall's around crossword puzzles, Monica Ferris's around needlework, and Charlotte MacLeod's "Sarah Kelling" series around art. Other series focus on topics ranging from fishing, golfing, and hiking to fashion, antiques, and interior decoration. Cat-lovers are well represented among the ranks of cozy-mystery detectives, notably in the work of Rita Mae Brown and Lilian Jackson Braun, as are herbalists (of whom the best known is Ellis Peters' medieval sleuth Brother Cadfael).
Avoidance of explicit sex and violence, emphasis on puzzle-solving over suspense, a small-town setting, and a focus on a hobby or occupation are all frequent elements of cozy mysteries. The precise boundaries of the sub-genre remain vague, however, with the work of authors such as Aaron Elkins and Philip R. Craig considered borderline cases.
Notable examples of the genre 
- The Miss Marple character, created by Agatha Christie, who appeared in twelve novels that have been adapted numerous times for film and television.
- Hetty Wainthropp Investigates: An English drama starring Patricia Routledge as the eponymous old busybody, who solves mysteries around her Lancashire neighbourhood.
- Murder, She Wrote: An American series starring Angela Lansbury as mystery novelist Jessica Fletcher, who finds that her work often has parallels with her own life.
- The Cat Who... series by Lilian Jackson Braun began as a more "hardboiled" mystery series in the late 1960s, but transformed into cozy mysteries when the author resumed writing them almost 20 years later.
- Rosemary & Thyme: a British mystery television series that combines accidental amateur sleuthing and gardening. A few episodes have been adapted and expanded as full length novels.
- Pie in the Sky: a British mystery television series that combines sleuthing and cooking. A police detective and gourmet runs his own restaurant in between solving crimes.
- The Mrs. Murphy series written by Rita Mae Brown and "co-authored" with Sneaky Pie Brown, her cat whom the main cat character, Mrs. Murphy, is based on. The Jane Arnold series also falls in to the sub-genre.
- The Hilary Tamar Series, written by Sarah Caudwell, featuring Professor Hilary Tamar and a cast of clever and trouble-prone young London barristers.
- Mr. and Mrs. North novels, written by Frances and Richard Lockridge, which feature an ordinary couple who live in Greenwich Village with their cats Gin, Sherry and Martini and solve mysteries.
- "The Dixie Hemingway Mysteries" by Blaize Clement, chronicling the adventures of a cop turned pet-sitter in Siesta Key Florida.
- The Aunt Dimity novels by Nancy Atherton feature American Lori Sheppard, who settles in an English village thanks to an inheritance from "Aunt" Dimity (an old friend of her late mother's). Dimity herself communicates with Lori via a magical journal to help solve mysteries involving Lori and her neighbours.