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 Hitchhiker's 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: McWatt. 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 impostors in 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.
As is Vetinari. It's been remarked that he must be insane, because it's not possible for someone to be as brutally sane as he is. Mind you, Vetinari doesn't seem to mind indulging in or encouraging a little absurdity from time to time.
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 Nineteen Eighty-Four. 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 Safehold, Raynos Alvahrez is the only member of Army of Justice's high command to realize that they can't win and should start retreating, which others, still confident of imminent victory (despite having almost no food, losing men by droves to Charisians and sickness and being nearly completely surrounded), label as defeatism.
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. Okay, the 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.
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 it's very possible that his real failing was that he was simply Out-Gambitted before he even stepped onto the board.
Ellaria Sand is against Doran Martell and the Sand Snakes' revenge plot against the Lannisters by pointing out that the people responsible for Elia's and Oberyn's deaths are dead and that getting involved invokes the Cycle of Revenge.
Stephen of Ulysses comes off as this compared to his friends and co-workers. Of course, it is a really weird book...
Moby-Dick: Starbuck 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 a mad course, but also simply an unprofitable one 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 act like a crazy fool to humor or prank him for his delusions. The unnamed ecclesiastic from chapter XXXI and the unnamed Castilian in 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.
"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 far 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.
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. However, she is prone to her own biases and moments of petty irrationality, especially with Ron, since they have strong feelings toward one another, but their insecurities keep them from expressing it as anything other than jealousy when the other is with someone (until the final book.)
The calm and humble Firenze is this when compared to the proud violent centaurs that make up the rest of the herd seen by the reader in the Forbidden Forest, even being willing to interfere with fate to a small degree despite their staunch You Can't Fight Fate cultural outlook.
Played with regarding Severus Snape. 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. On the other hand, he's a deeply disturbed man who has let childhood grudges consume him into adulthood, bullies his students during class, destroys the classwork of students he doesn't like and plays favorites. His petty vindictive behavior is only tolerated because he is a very competent wizard and Potions master (though Word of God says that Dumbledore may also keep him a teacher like him in order to teach students that you can't trust everyone in positions of authority.)
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.
Mr. George of The Ruby Red Trilogy. He is the only one of the Guardians to trust Gwen and even believes her that she can see ghosts. He tries to persuade the other Guardians to explain more of what's going on to her, but usually fails as everybody else is convinced that Gwen will steal the chronograph at the first opportunity, when really she just wants to elapse in peace.
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.
The eponymous protagonist of The Chronicles Of Steve Stollberg. The other 2 main characters, James and Harrison, are conspiracy theorists who believe that Mickey Mouse faked his death and was cryogenically frozen respectively in spite of contradictory evidence, but Steve is the only main character who is smart enough to realize the truth that the government is telling the truth about Mickey Mouse’s death.
Scobie in Don't Call Me Ishmael!. The rest of the Fab Five get caught up in Razza's crazy schemes quite often, whereas Scobie nearly always stays calm and rational. He usually has to get the debating meetings back on track when the others get distracted.
In web serial Barkwire, a commenter who goes by ConfusedGuy seems to be the only one in town who doesn't think the personal lives of stray dogs are Serious Business.
The Hunger Games: Katniss at least considers Cinna to be one when she arrives at the Capitol.
Even after all the main characters in Eden Green are infected with an alien needle symbiote, the main character attempts to remain rational and makes detailed plans about what to do next. The other infectees' chaotic actions dismay her, until her own infection begins to warp her mind.
In Homecoming Jarlaxle is the only one of his party of three that is not affected by the weakening Faerzress in the Underdark. Drizzt and Entreri meanwhile, are constantly at each others' throats, thinking the other to be a demon in disguise. Jarlaxle has the air of an exasperated parent throughout Maestro.
In Gone with the Wind, Rhett Butler is the only person at the barbeque that opens the book to point out that the South has very little industry, and that the North has a much larger population to draw on for soldiers. "All we have is cotton, and slaves, and arrogance!" he says, and everybody howls him down. Another, older, man is a veteran of the Mexican War, and tries to warn the hotheaded young men around him that war is not fun, only to be blown off.
In The Traitor Son Cycle, Comte d'Eu is the only Gallish knight in Alba to realize that antagonizing and attacking the local population is the worst possible way to survive in a foreign country, and is the only one to try and alleviate the tensions between Galles and Albans, even as his fellow knights are laughing at him for being a weakling and a sellout.
In The Worm Ouroboros, Lord Gro is the only person in a world of Proud Warrior Race GuyBlood Knights who doesn't see warfare and bloodshed as inherently noble objectives in themselves. Deconstructed, as this leads to him developing an obsessive sympathy with the underdog that causes him to serially betray everyone in sight, until he finally goes completely insane during the climactic battle and starts alternately killing soldiers on each side to prove his neutrality, which leads to his death.
Among demons, the Daemon fits. He, like the rest of his kind, looks down on humans, but unlike them, he recognizes their worth and is willing to work with them directly to get results — hence why the heartless troop exists in the first place.