The Exploratorium and the California Academy of Science have each received $2 million donations from Google.
Seven facilities, including science museums in London, Boston, Chicago and New York, will split $12 million.
“Googlers volunteer and have ties there,” company spokesman Jamie Yood said. “They have a presence in that community.”
The Academy of Science will use the money to build a biodiversity exhibit scheduled to open in 2014. Spokeswoman Helen Taylor said the exhibit will show how plants, animals and microorganisms coexist.
The Exploratorium will fund the construction of its new building at Piers 15 and 17, where the museum will double in size.
“It is clear that Googlers believe strongly that the need for international competitiveness in science and technology begins with enthusiasm for science,” Exploratorium Director Dennis Bartels said.