"This agreement between Nasa and Google will soon allow every American to experience a virtual flight over the surface of the moon or through the canyons of Mars," said Nasa administrator Michael Griffin.
The deal will make "Nasa's space exploration work accessible to everyone," he added.
Public resource
The deal formalises a partnership started last year when Google agreed to build a research centre at the Nasa Ames Research Center.
The two organisations said they will now collaborate in a variety of areas including adding data collected by Nasa to the online mapping tool Google Earth.
Other projects could include finding new ways for humans to interact with computers as well as utilising Google's expertise to accelerate the process of searching the massive amounts of data collected by the space agency every year.
"NASA has collected and processed more information about our planet and universe than any other entity in the history of humanity," said Chris Kemp, director of strategic business development at Ames.
"Even though this information was collected for the benefit of everyone, and much is in the public domain, the vast majority of this information is scattered and difficult for non-experts to access and to understand."
The internet's leading search engine already provides some Nasa data through programs such as Google Mars, an interactive map that allows users to explore maps of the red planet's surface.
Another service, Google Moon, lets users view the sites of moon landings.
The two organisations said they are now finalising a series of new collaborations including "products, facilities, education and missions".
"We're pleased to move forward to collaborate on a variety of technical challenges through the signing of the Space Act Agreement," said Eric Schmidt, chief executive officer of Google.