The rockers ended months of speculation as they had made the announcement during a secret gig in Somerset on Friday (24 February).
They will play the iconic Pyramid Stage on the Saturday night of the festival, which this year takes place from 23 to 25 June.
The band played Frome’s Cheese And Grain in front of a specially invited audience, which was streamed live on Facebook, with festival organiser Michael Eavis introducing them.
The band were supposed to headline Glastonbury in 2015, but were forced to pull out when frontman Dave Grohl broke his leg. As a result, Florence + The Machine were promoted to headliners.
Foo Fighters now join Radiohead at the top of this year’s bill, with a third headliner expected to be announced in the next few months.
Emily Eavis, who organises Glastonbury with her father, said: “We’re incredibly lucky to have the Foo Fighters headlining on the Saturday night this year – it was obviously devastating when they had to pull out in 2015 – and the thought, effort and generosity they’ve put into this announcement is just unbelievable.”