The wartime coding centre in Milton Keynes has come under financial strain in recent months due to the impact of the coronavirus pandemic, but the social media platform has announced it is giving £1 million to the museum at the site.
Bletchley Park chief executive Iain Standen said: "With this significant support, we at Bletchley Park can weather the current crisis and survive into the future, keeping the doors open for future generations."
The Bletchley Park Trust previously revealed that it was on course for a £2 million deficit this year, with the pandemic meaning that 35 of the 100 jobs at the site were likely to go.
However, Facebook has stepped into the breach, providing much-needed funds for the coding centre.
Steve Hatch, Facebook's boss in northern Europe, said: "The historic achievements of Alan Turing and the Bletchley team have benefited all of us greatly, including Facebook, and we're thrilled to help preserve this spiritual home of modern computing."
Professor Sue Black previously launched a campaign to save the site and is thrilled by Facebook's recent intervention.
She told the BBC: "The work done at Bletchley Park by thousands of people shortened WW2 by two years, saving millions of lives.
"We are so lucky to still have the place where the codebreakers worked available for anyone to visit."