In a small town, Charlie Bucket, a poor paperboy, watches kids visit a candy shop. Walking home, he passes Willy Wonka’s chocolate factory. A mysterious tinker recites the first lines of William Allingham’s poem “The Fairies”, and tells Charlie that “nobody ever goes in, and nobody ever comes out”. Charlie rushes home to his widowed mother and bedridden grandparents. That night, Charlie tells his Grandpa Joe what the tinker said and Joe reveals that Wonka locked the factory because other candy makers, including his rival Arthur Slugworth, sent in spies to steal his recipes. Wonka shut down the factory, but after three years resumed selling candy; the origin of Wonka’s labor force is unknown.
Wonka announces he has hidden five “Golden Tickets” in chocolate Wonka Bars. Finders of the tickets will receive a factory tour and a lifetime supply of chocolate. The first four tickets are found by the gluttonous Augustus Gloop, the spoiled Veruca Salt whose family is wealthy in the nut business, the gum-chewing Violet Beauregarde, and the television-obsessed Mike Teevee. As each winner is announced on TV, a man whispers to them. A subsequent news report announces the fifth ticket was found by a Paraguayan millionaire/casino-owner, causing Charlie to lose hope. The next day, Charlie finds money in a gutter and uses it to buy a Wonka Scrumdiddlyumptious bar; with the change, he buys a regular Wonka Bar for Joe. While walking home, Charlie overhears that the millionaire forged the fifth ticket. Charlie opens the Wonka Bar and finds the fifth ticket. Rushing home, he encounters the same man seen whispering to the other winners, who introduces himself as Slugworth and offers a reward for a sample of Wonka’s latest creation, the Everlasting Gobstopper.
Returning home with the Golden Ticket, Charlie chooses Joe, who, in his excitement, rises out of bed for the first time in 20 years, as his chaperone. The next day, Wonka greets the ticket winners and leads them inside, where each signs a contract before the tour. The factory includes a candy land with a river of chocolate and other sweets. The visitors meet Wonka’s labor force, small men known as Oompa-Loompas. Augustus falls into the chocolate river and is sucked up in a pipe to the Fudge Room. Wonka takes the remaining guests on a surreal boat ride, leading to the Inventing Room, where everyone receives an Everlasting Gobstopper. Violet blows up into a large blueberry after chewing an experimental piece of three-course dinner gum over Wonka’s warnings, and must be squeezed before she explodes. The remaining group samples some lickable wallpaper, and then reaches the Fizzy Lifting Drinks Room, where Charlie and Joe ignore Wonka’s warning and sample the drinks. They float and have a near-fatal encounter with an exhaust fan before their burping “deflates” them and lets them descend back to the ground. In the Golden Eggs Room, Veruca demands a golden goose for herself before falling into a garbage chute which leads to the furnace, with her father falling in trying to rescue her. The rest of the group tests out Wonka’s Wonkavision, used to teleport chocolate bars, and Mike teleports himself, becoming only a few inches tall.
As the tour ends, Charlie and Joe, the only two remaining, ask about the other kids, and Wonka assures them that they will be restored to normal. Wonka then retreats to his office without awarding them the promised lifetime supply of chocolate. Grandpa Joe and Charlie enter his office to ask about this, and Wonka informs them that by “stealing” Fizzy Lifting Drinks, they have violated the contract, thereby forfeiting their prize. Joe angrily tells Charlie that he should give Slugworth the Gobstopper as revenge, but Charlie returns the candy to Wonka. Wonka declares Charlie the winner, and reveals that “Slugworth” was his employee Mr. Wilkinson; the offer to buy the Gobstopper was a morality test that only Charlie passed. The trio enter the “Wonkavator,” a multi-directional glass elevator that flies out of the factory. Soaring over the city, Wonka reveals he created the contest to find someone worthy enough to assume control of his factory, and Wonka gives it to Charlie and his family.