The NFL also awarded the 51st Super Bowl to Houston after team owners voted for the two cities ahead of a South Florida bid.
San Francisco will host the 50th Super Bowl in early 2016 at Levi's Stadium, the brand new home of the 49ers.
The stadium is currently being constructed in Santa Clara, just south of San Francisco. The only previous time the Super Bowl was played in the Bay Area was in 1985, when the 49ers beat the Miami Dolphins at Stanford Stadium.
Houston will be hosting the game for the third time after 1974 and 2004.
The 2014 Super Bowl had already awarded to East Rutherford in New Jersey, the home of the New York Giants and New York Jets, while the 2015 game will be held in Arizona.