"Once we heard... Foo Fighters had been forced to pull out, there was only one person we wanted to call and that was Florence," said organiser Emily Eavis.
Florence Welch had already been confirmed to perform with her band before Foo Fighters on 26 June.
She last performed at the Somerset event in 2010.
Foo Fighters cancelled their Glastonbury appearance and a string of other dates after frontman Dave Grohl fractured his leg in a stage fall in Sweden.
Ironically, Welch's recent concerts have been hampered by her breaking her foot on stage at the Coachella music festival in April.
This summer will mark the 28-year-old's first performance on Glastonbury's famed main stage.
"Every time she has played here she's done something spectacular and we always knew she would headline the Pyramid one day," said Eavis, who runs Glastonbury with her father Michael.
"I'm delighted she's agreed to step up to it - she's going to smash it!"
Michael Eavis added: "I'm absolutely delighted. She's a fantastic girl, and she's English as well.
"It's a moment for her and she will be triumphant."
He added that he hoped to book Foo Fighters for next year's festival, but nothing was confirmed yet.
Kanye West is the headline act on 27 June, while The Who will close this year's festival the following night.
Organisers said revised Pyramid Stage set timings for 26 June would be announced soon.
Florence and the Machine will headline the Pyramid Stage at Glastonbury this year, following Foo Fighters' withdrawal from the Friday night slot.