The deal caps weeks of haggling between chancellor-in-waiting Merz and the SPD after he topped elections in February but fell well short of a majority, with the far-right Alternative for Germany surging into second place.
Pressure to reach a deal has taken on new urgency as the government will take charge at a time of global turbulence in an escalating trade conflict sparked by US President Donald Trump's sweeping import tariffs.
The conservative CDU-CSU bloc and the SPD will present their agreement to form a new government later on Wednesday.
Merz, who called Trump's US an unreliable ally, has already vowed to build up defence spending as Europe faces a hostile Russia, and to support businesses struggling with high costs and weak demand.
He has also pledged to get tougher on migration, moving Germany away from a more liberal immigration policy under his conservative predecessor Angela Merkel during the 2015 European migrant crisis.
The coalition deal must still be ratified by a vote of the SPD's membership.
If they back the deal, the chancellorship would return to conservatives after the three-year interregnum of the SPD's Olaf Scholz, whose tenure was marked by the economic and political fallout of Russia's full-scale invasion of Ukraine in 2022.
As details of the coalition deal began to leak out, a source said Germany will lower corporate tax from 2028 and reform welfare payments.
German economic institutes have cut back their forecast for this year's growth to 0.1 per cent from the 0.8 per cent they had expected in September, sources told Reuters.
Germany has endured two years of contraction already and the US tariffs are a sharp blow to its highly export-focused economy.