Lewis Carroll's Alice in Wonderland. An interesting case considering that Alice is a child in a warped vision of adult life; often she questions what's going on around her and tries to argue her opinions, other times she happily accepts the nonsense that the Wonderland inhabitants serve up to her.
The Caterpillar is a straighter example; he is without question the only member of the cast who makes anything even remotely resembling conventional sense and is the only individual, besides the Cheshire Cat, who gives Alice any helpful advice. That's right, the talking, smoking caterpillar is the sane one here.
Arthur Dent, protagonist of The Hitchhikers Guide To The Galaxy, is a classic example, although he eventually realizes that trying to be logical in an insane universe is, in fact, illogical and stops.
So Long And Thanks For All The Fish featured Wonko the Sane, who lived in a house called The Outside of the Asylum. After realising he lived in a world where people feel the need to include instructions for toothpicks (or worse, that some people might actually need them), he decorated his house inside out and declared the whole of the rest of the world to be an insane asylum.
This is a subtle parody of the parochialism and ___centricity often underlying the Only Sane Man. Wonko observed the world as insane and built a box, inverted by his perspective, around everything prone to cause him culture shock, and labeled it 'mad'. Arthur witnessed a universe that to him (and the reader) is insane, which he neatly isolated from his planet and likewise comfortably inhabits his inverted box.
Worryingly enough, Ford Prefect gets his turn at the role when he's stranded with the Golgafrinchans at the end of The Restaurant at the End of the Universe. They are unable to invent the wheel because they can't decide on its colour.
Most characters in Catch-22 view themselves as this, but from the reader's perspective the one who's right is probably Yossarian, the only one who really understands that other people are trying to kill him for no especially logical reason.
Part of the point of the book is to examine the very idea of sanity. For example, it's completely logical to be disgusted with your uniform after watching an innocent kid die an awful death, but it leads Yossarian to strip naked and watch the kid's funeral from a tree. It's logical to make every second last as long as possible when you think you're going to die soon, but it's somewhat absurd to then strive to bore yourself to tears at every opportunity so your life will seem longer. There is no way to be sane in circumstances so overwhelmingly insane.
Double subversion: Mc Watt. The craziest combat soldier of them all, because he was completely sane and didn't really mind being at war.
The Game by Neil Strauss, where he is the foil to the crazy antics of Mystery and a few other Pick-Up Artists.
Doctor Robinson correctly identifies the King and the Duke as imposters in The Adventures of Huckleberry Finn. They're pretending to be Peter Wilkes' brothers from England, and everyone else, including his daughters, believes it. In the 1960 movie, youngest daughter Joanna spots them for fakes right off because Huck dresses like a dirt-poor American kid and can't accurately name the ocean they crossed.
Most of the main characters in the Discworld novels fit this category. In fact you could characterize the plot of most Discworld books by passing around a Sanity Ball.
Rincewind is a particularly Genre Savvy Wizzard [sic] in a world that is ruled by the Theory of Narrative Causality, so for him life is (for instance) knowingIt Was His Sled right from the start, while everyone around him wastes time insisting it was a banana, or possibly a walrus.
Vimes of the Watch books, likewise, seems to be playing the Straight Man for his entire city.
We are told that Unseen University's Ponder Stibbons thinks of himself as "the University's token sane person", but this is the man who built a thaumic reactor in the squash court despite knowing about Loko. it seems likely that most of the faculty think of themselves as the only one who is entirely sane. Of course being the OSM at UU is not a job with long-term prospects:
When the Bursar was introduced, he was the OSM; a few books later he was a Cloud Cuckoo Lander.
The Librarian is the Only Sane Ape.
The sanity of any human character pales in comparison to that of Death (and his granddaughter Susan, whomayattimes be considered more sane than Death).
In Maskerade, Agnes's insistence on being sensible about the Opera Ghost ("So we are talking about some kind of mask, then?") and only seeing things that were really there earned her "the sort of look ufologists get when they say 'Hey, if you squint, you can see it really is just a flock of geese.'" It's also strongly implied that being the Opera House's Only Sane Person (before Agnes) is what drove Salzella completely mad.
In Monstrous Regiment, Polly also plays the role of the Only Sane Man, in a group of soldiers including a pyromaniac, his violent friend, a vampire suffering from withdrawal symptoms, a fervently religious boy who talks to God (the Duchess), and more.
The Last Hero states that for any organization to survive, it needs at least one person who knows how things work.
The Baudelaires (and the Quagmires) in A Series of Unfortunate Events collectively fill this role, surrounded as they are by corrupt, foolish, borderline Ax-Crazy, and just plain unpleasant people. Every other sane person is dead or dies eventually.
The Horus Heresy novels play with this trope a lot. The protagonists of many of the books, particularly Gavriel Loken, Solomon Demeter, Saul Tarvitz, and Nathaniel Garro find themselves adhering to this trope while their legions are slowly corrupted into the grip of Chaos, supported by a small number of other characters who realize the corruption and stand against it. This being Warhammer 40000, the sane men are almost universally killed by the insane ones.
More metaphorically, it's not just the Emperor, but every common soldier. The average Imperial Guardsman is not crazy, but what can he do? He fires his weapon at the enemy of the day and hopes for the best, but no matter how competent or heroic he is, the consequences of his actions will inevitably be erased under the unstoppable march of GRIMDARK.
In one of the darker examples of this trope, Winston Smith feels like the only sane man in 1984. On the other hand, O'Brien sees him as insane due to his refusal to accept the Party's dominance over the universe (in one of the most infamous examples, 2+ 2=5, if the Party decrees that that is the case). One of the working titles for 1984 was "The Last Man In Europe". Much like with Catch-22 listed above, the novel is meant to be an exploration of whether something approaching sanity is truly possible when society itself has gone insane.
The title character of Odd Thomas, but only by a very narrow margin. He sees the spirits of the restless dead, and once tried to prevent a massacre with nothing more than hope and his bare hands. Other people around him have, variously, tried to nuke major cities in the United States, summoned bizarre constructs on his subconscious using quantum physics, and threatened to steal Odd's soul unless he showed her how to see dead people.
In the Hoka stories, long-suffering Alexander Jones is the human ambassador to the Hoka, an extremely suggestible race who spend their time gleefully playing out roles from human fiction.
Laocoon in The Aeneid was the only one not to be fooled by the giant wooden horse. Ok, gods sent snakes to strangle him to "disprove" him, but anyway he was right. Then again, the fact that he was the only one not fooled does not mean he was the only one not crazy.
Nellie Dean of Wuthering Heights, and how alone is she... Let's just say it's odd that anything with "sane" in its name would be associated with Wuthering Heights.
Despite the way she tries to paint herself, she's clearly bitter, vindictive, and incredibly biased.
Dr. Seuss's Wacky Wednesday book, in which a character wakes up to find a shoe on the wall. Things get progressively weirder, but nobody else acknowledges this and thinks that he is the weird one. Finally, a police officer explains that that's just how things are going to work that day, and that everything will be back to normal in the morning.
Arnold from the Magic School Bus series is the only one to realize how utterly insane and completely terrifying it is to, say, be shrunk down to the size of a pill and be eaten, travel back in time and be chased by dinosaurs, travel in space without astronaut training, be baked into a cake, etc. The series being what it is, he is usually presented as a coward.
Norma in Barbara Gowdy's Falling Angels. Let's see — Dad's a tyrant, Mum's a chronically depressed alcoholic who dropped her first baby off Niagara Falls, Sandy's a ditz, and Lou is seething with rage...
Narrator Jovis in ''Crossroads Road'', by Jeff Kay, watching the level of dysfunction in his wife's already quirky family spiral out of control when a large amount of money and manipulation enters the picture.
Oftentimes in the other books of the Torah, Moses and Aaron.
Several prophets in later books, most notably Jeremiah.
Admiral Daala and Gilad Pellaon in Darksaber, amongst the Imperial military higher-ups.
Poor Davos Seaworth in A Song of Ice and Fire is the only noble lord in king Stannis's court who shows any common sense and tells his king not what he wants to hear, but what he thinks. Luckily for him, Stannis likes the honest counsel.
Asha Greyjoy is one of the few among the ironborn who realizes that their cunning plan of taking on the entire Seven Kingdoms is utterly doomed, and that when the mainland civil war ends, no matter who wins, they're just going to crush them like they did the last time they rebelled.
Rodrik Harlaw is even more sane than her, but no one (including Asha) ever listens to him.
Eddard Stark could be this in retrospect. He is best remembered for putting Honor Before Reasonand paying the price for it, but later books show that the other people in Roberts court at the time- including Robert himself- were generally murderous, incompetent, or outright evil, sometimes a combination of all three. In particular, both Varys and Littlefinger wanted the civil war and in fact helped to orchestrate it, so its very possible that his real failing was that he was simply Out-Gambitted before he even stepped onto the board.
Stephen of Ulysses comes off as this compared to his friends and co-workers. Of course, it is a really weird book...
Starbuck of Moby-Dick seems to be the only man aboard the Pequod who realizes that whales are animals who are incapable of malice, and to hunt one particular whale to the ends of the earth is not only madness, but also unprofitable for a professional whaling crew.
Dork Diaries has two. Nikki is by far the most normal member of her Comic Trio, but Brandon is by far the most normal character of all.
Septimus Heap: Septimus is the only one to notice or care about the Cerys when she approaches Syren Island, lured there by the Syren.
Watson in Sherlock Holmes. Sure, Holmes is brilliant, but Watson has all the common sense. It helps that, unlike most people involved in the mysteries, he's not actually a detective, so he isn't caught up in the various rivalries between the parties at Scotland Yard and other places. He's just your typical guy witnessing the goings-on, often with a look of horror or a rueful smile.
Don Quixote: The titular character has the skill to make everyone around him to act like a crazy fool to humor / prank him for his delusions. The unnamed ecclesiastic from chapter XXXI and the unnamed Castilian for chapter LXII, both from part I, are the only ones who publicly recognize that Don Quixote is a crazy fool, and lampshade that everyone who makes jokes on him is also a crazy fool too.
"By the gown I wear, I am almost inclined to say that your excellence is as great a fool as these sinners. No wonder they are mad, when people who are in their senses sanction their madness! I leave your excellence with them, for so long as they are in the house, I will remain in my own, and spare myself the trouble of reproving what I cannot remedy;"
Thou art mad; and if thou wert so by thyself, and kept thyself within thy madness, it would not be so bad; but thou hast the gift of making fools and blockheads of all who have anything to do with thee or say to thee. Why, look at these gentlemen bearing thee company! Get thee home, blockhead, and see after thy affairs, and thy wife and children, and give over these fooleries that are sapping thy brains and skimming away thy wits."
In Kafka's The Trial, K goes through all the stages: bewilderment as he is put on trial without any explanation of his crime and first encounters the ridiculous bureaucracy surrounding the court, bargaining as he hires a lawyer and tries to fight the charges the 'right' way, and finally acceptance when he is taken out in the middle of the night for sentencing.
In an amusing subversion the titular character of "The One Sane Man" only THINKS he's this. Really, the most sane person in that book is the narrator.
In Fahrenheit 451, Montag is portrayed as a man who is trapped in a society he begins to realize is fare from utopian and is, in fact, just asinine foolishness wrapped in sensation to hide this. He is among a very small minority who believes that society would benefit from sentient thought.
The protagonist John in Brave New World seemed to feel like this, and ends up killing himself.
He isn't really sane.
Hermione Granger is pretty much the only person in the whole Harry Potter universe who can (usually) be relied on to act rationally and with any kind of foresight. Basically she's the reason the protagonist even makes it to the final book in one piece.
Snape is this on the Hogwarts staff. He acts the way a normal teacher would if they caught students up to the sorts of things the main cast get up to. He takes points when they are out after curfew and whatnot while the rest of the teachers allow students into dangerous situations and condone their poking their noses where they do not belong.
Edilio from GONE is the only person in Perdido Beach who doesn't have any sort of disorder and is often the one to say and do the responsible, sane thing.
The Hans Christian Anderson fairy tale The Emperor's New Clothes is a prime example of this trope. All of the emperor's subjects feel content humoring the emperor by not pointing out his new "suit" is nothing at all, thus arguably creating something of an alternate reality. Finally, a child plays the Only Sane Man role by pointing out that yes, indeed, the Emperor has no clothes.
In Game Slaves, Dakota is the only one to question why Team Phoenix is constantly fighting and dying.
Ted Jones in Stephen King (as Richard Bachman)'s Rage - when main character/narrator Charlie kills the class's teacher (and another one later on) and commandeers the classroom, Ted is the only person in the class who acts like Charlie is a seriously disturbed killer; all the others treat it like a group therapy session. Understandably, the novella is an Old Shame for King, especially considering that in the end, the other students turn on Ted and both he and Charlie wind up in asylums.
Both of the leads in the Jeeves and Wooster novels end up in this role often. Bertie is of the 'slightly smarter than the rest but hapless to fix the problem' variety, while Jeeves is... well, The Jeeves.