The pair have made their interventions in a special edition of The New Statesmen, guest-edited by former Prime Minister Gordon Brown.
Annan, who led the UN from 1997 to 2006, and was succeeded by current secretary general Ban Ki-Moon, praised the EU as “a triumph”.
“No nation can afford to be too isolated. Despite some shortcomings, the European union project has been a triumph and all the member states should strive to strengthen rather than weaken it,” he said.
While Berners Lee added: “The logical reason is that we need structures of all scales to manage this planet, and there a good many things that are best done at the scale of Europe.
“The EU level, though, is essential for us...My heart and wallet are at one: Britain should remain in Europe."
However, Leave voters have sought to use the endorsements against the Remain campaign – when Merkel intervened last week, Boris Johnson complained of “European elites”, who he said were panicking over a potential Brexit.