Chancellor Philip Hammond said a 2 per cent UK digital services tax will come into force in April 2020 and is expected to raise £400 million a year.
It will only be paid by profitable companies which generate at least £500m a year in global revenues. It applies to income which firms generate through providing search engines, social media platforms and online marketplaces.
The tax is likely to affect only 30 large companies.
A spokesman said the Treasury was “treading softly” at first but would keep the level of the tax under review.
Mr Hammond said: “The rules have simply not kept pace with changing business models.
“And it’s clearly not sustainable, or fair, that digital platform businesses can generate substantial value in the UK without paying tax here in respect of that business.”
The Chancellor has previously said that the government was looking at improving “fairness”.
Shares in US-listed Amazon dropped almost 5 per cent following the announcement. Netflix and Google were also trading lower.
The rise of online shopping has been a major focus for critics of the existing tax system in recent months, with the likes of Tesco chief executive Dave Lewis calling for a level playing field between online and bricks-and-mortar retailers.