Pudd'nhead Wilson (1894) is a novel by American writer Mark Twain. Its central intrigue revolves around two boys—one, born into slavery, with 1/32 black ancestry; the other, white, born to be the master of the house. The two boys, who look similar, are switched at infancy. Each grows into the other's social role.

The story was serialized in The Century Magazine (1893–4), before being published as a novel in 1894.

The setting is the fictional Missouri frontier town of Dawson's Landing on the banks of the Mississippi River in the first half of the 19th century. David Wilson, a young lawyer, moves to town and a clever remark of his is misunderstood, which causes locals to brand him a "pudd'nhead" (nitwit). His hobby of collecting fingerprints does not raise his standing in the eyes of the townsfolk, who consider him to be eccentric and do not frequent his law practice.

"Pudd'nhead" Wilson is left in the background as the focus shifts to the slave Roxy, her son, and the family they serve. Roxy is one-sixteenth black and majority white, and her son Valet de Chambre (referred to as "Chambers") is 1/32 black. Roxy is principally charged with caring for her inattentive master's infant son Tom Driscoll, who is the same age as her own son. After fellow slaves are caught stealing and are nearly sold "down the river" to a master in the Deep South, Roxy fears for her son and herself. She considers killing her boy and herself, but decides to switch Chambers and Tom in their cribs to give her son a life of freedom and privilege.

The narrative moves forward two decades. Tom Driscoll (formerly Valet de Chambre), has been raised to believe that he is white and has become a spoiled aristocrat. He is a selfish and dissolute young man. Tom's father has died and granted Roxy her freedom in his will. She worked for a time on river boats, and saved money for her retirement. When she finally is able to retire, she discovers that her bank has failed and all of her savings are gone. She returns to Dawson's Landing to ask for money from Tom.

Tom responds to Roxy with derision. She tells him the truth about his ancestry and that he is her son and partially black; she blackmails him into financially supporting her.

Twin Italian noblemen visit Dawson's Landing to some fanfare, and Tom quarrels with one. Desperate for money, Tom robs and murders his wealthy uncle and the blame falls wrongly on one of the Italians. From that point, the novel proceeds as a crime novel. In a courtroom scene, the whole mystery is solved when Wilson demonstrates, through fingerprints (which are now largely discounted as accurate forensic evidence), both that Tom is the murderer but not the true Driscoll heir.

Although the real Tom Driscoll is restored to his rights, his life changes for the worse. Having been raised as a slave, he feels intense unease in white society. At the same time, as a white man, he is essentially excluded from the company of blacks.

In a final twist, the creditors of Tom's father's estate successfully petition the governor to have Tom's (Chambers) prison sentence overturned. Shown to be born to a slave mother, he is classified as a slave and is legally included among the property assets of the estate. He is sold "downriver", helping the creditors recoup their losses.

David Wilson makes a joke that is misunderstood by the townsfolk of Dawson's Landing, who take Wilson's words literally. They consider the subtle, intelligent Wilson to be a simpleton. Word of the joke spreads quickly and Wilson becomes known as "Pudd'nhead" for being a fool in the eyes of the townspeople.

The first part of the book seems to satirize racism in antebellum Missouri by exposing the fragility of the dividing line between white and black. The new Tom Driscoll is accepted by a family with high Virginian ancestry as its own, and he grows up to be corrupt, self-interested, and distasteful. The reader does not know, at the end of the story, whether Tom's behavior results from nature or nurture. One could interpret the story as a vindication of racism based on biological differences too subtle to be seen. (The essentialism is not reciprocal, however. Chambers adapts well to life as a slave and fails to successfully assume his proper place as a high-class white.)

The novel features the technological innovation of the use of fingerprints as forensic evidence. "The reader knows from the beginning who committed the murder, and the story foreshadows how the crime will be solved. The circumstances of the denouement, however, possessed in its time great novelty, for fingerprinting had not then come into official use in crime detection in the United States. Even a man who fooled around with it as a hobby was thought to be a simpleton, a 'pudd'nhead'."

Roxana is a slave, originally owned by Percy Driscoll and freed upon his death. Roxy is ⁄ black, or 15/16 white. With a fair complexion, brown eyes, and straight brown hair, she looks more white than black, which makes sense based on her ancestry. As she was born into slavery, she is still considered a slave and is associated with blacks. She identifies as black, and speaks the dialect of slaves in the antebellum Deep South. She is the mother of Valet de Chambre and acts as nanny to Thomas Driscoll. Due to her son's overwhelming percentage of European ancestry and appearance, she switches him with Driscoll's son when the boys are infants, hoping to guarantee Chambers freedom and an upper-class upbringing.

Thomas à Becket Driscoll is the son of Percy Driscoll. Tom is switched with Roxy's baby Chambers when he is a few months old, and is called "Chambers" from then on. Raised as a slave, Chambers is purchased by his uncle Judge Driscoll after his brother Percy dies. The judge is childless and sad, and wants to prevent the young man Tom Driscoll from selling Chambers downriver. Chambers is portrayed as a decent young man whom Tom forces to fight bullies. He is kind and always respectful towards Tom but receives brutal treatment by his master. He speaks in the black dialect spoken during slavery.

Valet de Chambre is Roxy's son. Chambers is ⁄ black, and as Roxy's son, was born into slavery. At a young age he is switched by his mother with Thomas à Becket Driscoll, a white child of similar age born into an aristocratic family in the small town. From then on he is known as "Tom", and is raised as the white heir to a large estate. Tom is spoiled, cruel and wicked. In his early years he has an intense hate for Chambers although the other boy protected Tom and saved his life on numerous occasions. Tom attends Yale for two years and returns to Dawson's Landing with "Eastern polish" which results in the locals disliking him more.

Tom is portrayed as the embodiment of human folly. His weakness for gambling leads him into debt. After his father's death, he is adopted by his uncle Judge Driscoll, who frequently disinherits him, only to rewrite his will again to include him.

Luigi and Angelo Capello, a set of near-identical twins, appear in Dawson's Landing in reply to an ad placed by Aunt Patsy, who is looking for a boarder. They say they want to relax after years of traveling the world. They claim to be the children of an Italian nobleman who was forced to flee Italy with his wife after a revolution. He died soon afterward, followed by his wife. One of the twins is said to have killed a man. One of the twins kicks Tom because he made a joke about him at a town meeting. As a result, Tom's uncle Judge Driscoll challenges Luigi Capello to a duel.

Wilson is a lawyer who came to Dawson's Landing to practice law, but was unable to succeed at his law practice after alienating the locals. He establishes a comfortable life in the town, working as a bookkeeper and pursuing his hobby of collecting fingerprints. Although the title character, he remains in the background of the novel until the final chapters.

Each chapter begins with clever quotations from Pudd’nhead Wilson’s Calendar, a project of Wilson's which endears him to Judge Driscoll but further confirms everyone else's opinion of him as a pudd’nhead.

Twain originally envisioned the characters of Luigi and Angelo Capello as conjoined twins, modeled after the late-19th century Italian conjoined twins Giovanni and Giacomo Tocci. He planned for them to be the central characters of a novel to be titled Those Extraordinary Twins.

During the writing process, however, Twain realized that secondary characters such as Pudd'nhead Wilson, Roxy, and Tom Driscoll were taking a more central role in the story. More importantly, he found that the serious tone of the story of Roxy and Tom clashed unpleasantly with the light tone of the twins' story. As he explains in the introduction to "Those Extraordinary Twins":

The characters of Luigi and Angelo remain in Pudd'nhead Wilson, as twins with separate bodies. Twain was not thorough in his separation of the twins, and there are hints in the final version of their conjoined origin, such as the fact that they were their parents' "only child", they sleep together, they play piano together, and they had an early career as sideshow performers.

"Those Extraordinary Twins" was published as a short story, with glosses inserted into the text where the narrative was either unfinished or would have duplicated parts of Pudd'nhead Wilson.

In The Adventures of Brisco County, Jr. (1993), an episode ("Brisco for the Defense") is loosely based on the novel. The novel is also featured in this episode as the inspiration for the final twist. But the episode takes place in 1893, a year before the book was published in the novel form in which it is shown.

^Myra Jehlen, "The Ties that Bind: Race and Sex in Pudd'nhead Wilson; Literary History 2(1), Spring 1990. Quote: "The progress from a good thing to a bad as the black boy grows up to murder the town patriarch who is his uncle, and to rob, cheat, and generally despoil the whole village, as well as plunging his mother into a worse state than before, makes as much sense in history as it fails to make in the story."

^Langston Hughes, "Mark Twain's Pudd'nhead Wilson, first published as the introduction to the 1962 edition of the novel; subsequently appearing in Interracialism: Black-white Intermarriage in American History, Literature, and Law, ed. Werner Sollors; Oxford University Press, 2000; p. 326.

^"For some years Wilson had been privately at work on a whimsical almanac, for his amusement—a calendar, with a little dab of ostensible philosophy, usually in ironical form, appended to each date; and the Judge thought that these quips and fancies of Wilson’s were neatly turned and cute; so he carried a handful of them around, one day, and read them to some of the chief citizens. But irony was not for those people; their mental vision was not focussed for it. They read those playful trifles in the solidest earnest, and decided without hesitancy that if there had ever been any doubt that Dave Wilson was a pudd’nhead—which there hadn’t—this revelation removed that doubt for good and all. That is just the way in this world; an enemy can partly ruin a man, but it takes a good-natured injudicious friend to complete the thing and make it perfect. After this the Judge felt tenderer than ever toward Wilson, and surer than ever that his calendar had merit" (pp. 70–71).