In a move designed to help drive down development costs and meet increasingly strict emissions legislation, the two companies have announced they "build a mutually beneficial long-term partnership".
In a statement, Toyota said: "By leveraging the resources of both companies to complement and enhance each other's products and technologies, the partnership wil result in more appealing cars that meet the diverse needs and tastes of customers all over the world."
As part of the new agreement, it is understood that Toyota will share its fuel cell and plug-in hybrid technology, while Mazda will supply its efficient range of Skyactiv engines. Other areas that will come under the agreement include the exploration new advanced safety technology.
Mazda is understood to have been looking at its own fuel cell vehicle for some time, while Toyota is on the cusp of bringing its own FCV model, the Mirai, to the UK later this year.
Sharing costs would benefit both brands, bringing economies of scale to what is currently an expensive emerging technology.
Speaking to Japanese media, Toyota president Akio Toyoda said: "We are excited to be working with Mazda. This partnership is based on a shared vision and mutual respect.
"We’ll respect each other's people, technologies and cultures. We will lead each other towards a better future.