Willy Wonka & the Chocolate Factory is a 1971 American musical fantasy film directed by Mel Stuart from a screenplay by Roald Dahl, based on his 1964 novel Charlie and the Chocolate Factory. It stars Gene Wilder as chocolatier Willy Wonka.