Charlie and the Chocolate Factory is a 1964 children's book by British author Roald Dahl. The story features the adventures of young Charlie Bucket inside the chocolate factory of eccentric chocolatier Willy Wonka.
Charlie and the Chocolate Factory was first published in the United States by Alfred A. Knopf, Inc. in 1964 and in the United Kingdom by George Allen & Unwin in 1967. The book was adapted into two major motion pictures: Willy Wonka & the Chocolate Factory in 1971, and Charlie and the Chocolate Factory in 2005. The book's sequel, Charlie and the Great Glass Elevator, was written by Roald Dahl in 1972. Dahl had also planned to write a third book in the series but never finished it.
The story was originally inspired by Roald Dahl's experience of chocolate companies during his schooldays. Cadbury would often send test packages to the schoolchildren in exchange for their opinions on the new products. At that time (around the 1920s), Cadbury and Rowntree's were England's two largest chocolate makers and they each often tried to steal trade secrets by sending spies, posing as employees, into the other's factory. Because of this, both companies became highly protective of their chocolate-making processes. It was a combination of this secrecy and the elaborate, often gigantic, machines in the factory that inspired Dahl to write the story.