The London Stock Exchange Group (LSE) and Deutsche Boerse have agreed terms for a "merger of equals".
The tie-up will create one of the largest exchange companies in the world with a combined value of about £21bn.
Under the terms of the deal, LSE shareholders will own 45.6% of the new holding company, while Deutsche Boerse shareholders will own 54.4%.
LSE chief executive Xavier Rolet said the two firms were "creating an industry-defining combination".
The two companies said together they should be able to make cost savings of €450m (£354m) a year, about 20% of the combined group's operating costs of €2.2bn last year.
The LSE group already owns Milan-based Borsa Italiana.
The two exchanges said the "combination of London, Frankfurt and Milan will provide a platform for financing and promoting economic growth of European companies and be an attractive offering to Asian and US companies looking to access investors and capital".
The newly-merged company will keep both the London and Frankfurt headquarters. The new holding company, UK TopCo, will be incorporated in the UK.
The merger is expected to be completed by the end of this year or early next year.
When it goes through, Mr Rolet will step down from his role as LSE chief executive, but will stay on for about a year to advise on the transition.
LSE chairman Donald Brydon will become chairman of UK TopCo and Deutsche Boerse chief executive, Carsten Kengeter, will become chief executive.
The boards of both the LSE and Deutsche Boerse have said they will recommended that their shareholders accept the offer.
However, earlier this month, Intercontinental Exchange (ICE), which owns the New York Stock Exchange, said it was considering making an offer for the LSE. It is not yet known whether it will go ahead with a hostile bid.
The LSE and Deutsche Boerse have set up a referendum committee to consider what impact a Leave vote in the EU Referendum might have.
At this stage, though both companies say the outcome of the Referendum is not a condition of the merger because they believe the combined group would be "well positioned to serve global customers irrespective of the outcome of the vote".
However, they added: "The outcome of that vote might well affect the volume or nature of the business carried out by the Combined Group. "
About 30% of the new group's revenue would come from the UK, 15% from Germany, 30% from the rest of Europe, 19% from North America and 6% from the rest of the world, mainly Asia.
The merger would mean the group is "better positioned to compete against large US peers in North America", as well as boosting its position in China and Asia generally," said the LSE in its statement.