The deal was engineered by Heinz's owner, the Brazilian investment firm 3G Capital, and billionaire investor Warren Buffett's Berkshire Hathaway.
3G Capital is the company behind the takeover of Tim Hortons by Burger King last year.
Heinz shareholders will be majority owners of the merged company and Kraft shareholders will receive stock in the combined company and a special cash dividend of approximately $10 billion US, or $16.50 per share.
Kraft shares closed on Tuesday at $61.33 and rose by about 25 per cent to $77.02 in pre-market trading after the deal was announced.
Current Heinz shareholders will own 51 per cent of the combined company, with Kraft shareholders owning 49 per cent.
The combined company's brands will include Kraft, Heinz, Oscar Mayer and others.
Both companies' boards have unanimously approved the deal, which is targeted to close in the second half of the year. It still needs approval from Kraft shareholders.