Charlie and the Chocolate Factory is a 2005 musical fantasy film directed by Tim Burton and written by John August, based on the 1964 British novel of the same name by Roald Dahl. The film stars Johnny Depp as Willy Wonka and Freddie Highmore as Charlie Bucket, alongside David Kelly, Helena Bonham Carter, Noah Taylor, Missi Pyle, James Fox, Deep Roy, and Christopher Lee. The storyline follows Charlie as he wins a contest along with four other children and is led by Wonka on a tour of his chocolate factory.
Development for a second adaptation of Charlie and the Chocolate Factory began in 1991, which resulted in Warner Bros. providing the Dahl estate with total artistic control. Prior to Burton's involvement, directors such as Gary Ross, Rob Minkoff, Martin Scorsese, and Tom Shadyac had been involved, while actors Bill Murray, Nicolas Cage, Jim Carrey, Michael Keaton, Brad Pitt, Will Smith, Adam Sandler, and many others, were either in discussion with or considered by the studio to play Wonka. Burton immediately brought regular collaborators Depp and Danny Elfman aboard. Charlie and the Chocolate Factory represents the first musical film directed by Burton and the first time since The Nightmare Before Christmas that Elfman contributed to a film score using written songs and his vocals.
Filming took place from June to December 2004 at Pinewood Studios in the United Kingdom. Rather than using computer-generated environments, Burton primarily used built sets and practical effects, which he claimed was inspired by the book's emphasis on texture. Wonka's Chocolate Room was constructed on the 007 Stage at Pinewood, complete with a faux chocolate waterfall and river. Squirrels were trained from birth for Veruca Salt's elimination. Actor Deep Roy performed each Oompa-Loompa individually rather than one performance duplicated digitally.
Charlie and the Chocolate Factory was released to positive critical reviews, with praise directed towards the visual style, set design, soundtrack, child stars, and Burton's direction. Depp's performance as Willy Wonka received a more polarized response, and the film has been graded more critically in the years since its release, now considered divisive. The film was a box office success, grossing US$475 million and becoming the eighth-highest-grossing film worldwide in 2005. The film received a nomination for Best Costume Design at the 78th Academy Awards.