Britain will impose a new competition regime next year to prevent Google and Facebook using their dominance to push out smaller firms and disadvantage consumers.
The code will be enforced by a dedicated unit within the Competition and Markets Authority (CMA), which this year said it needed new laws to keep the tech giants in check.
Google and Facebook dominate digital advertising, accounting for around 80 per cent of 14 billion pounds ($18.7 billion) spent in 2019, Britain's competition regulator the CMA said.
The two US companies have said they are committed to working with the British government and regulator on digital advertising, including giving users greater control over their data and the ads they are served.
While "unashamedly pro-tech", Britain's Digital Secretary Oliver Dowden said there was a growing consensus that the concentration of power in a small number of companies was curtailing growth, reducing innovation and having negative impacts on the people and businesses that rely on them.
"It's time to address that and unleash a new age of tech growth," Dowden said on Friday.
The newly-created Digital Markets Unit, which will begin work in April, could be given powers to suspend, block and reverse decisions made by technology firms and to impose financial penalties for non-compliance.
Companies will have to be more transparent about how they use consumer data and restrictions that make it hard to use rival platforms will be banned, the government said, adding that the rules will also support the news industry, rebalancing the relationship between publishers and platforms.
The CMA said on Monday it was assessing whether a complaint about Google technology warranted a formal investigation.
Marketers for an Open Web (MOW), a coalition of technology and publishing companies, said Google was modifying its Chrome browser and Chromium developer tools to give it greater control over publishers and advertisers.
Google said advertising practices needed to adapt to changing expectations around how data was collected and used.