The US Supreme Court has ruled that states can impose tax on sales from retailers outside the state, in a landmark decision that will see online shopping become significantly more expensive.

The ruling paves way for US states to collect tax from online retailers like Amazon and Ebay, which have previously been protected from paying tax if they had "no physical presence" in the state.

The Supreme Court revived a 2016 South Dakota law that required larger out-of-state e-commerce companies to collect sales tax, a mandate that the online retailers fought in court.

The ruling, authored by Justice Anthony Kennedy, is likely to lead other states to try to collect sales tax on purchases from out-of-state online businesses more aggressively.

“Rejecting the physical presence rule is necessary to ensure that artificial competitive advantages are not created by this court’s precedents,” Kennedy said.

In the digital era, the costs of complying with different tax regimes “are largely unrelated to whether a company happens to have a physical presence in a state,” Kennedy added.

The US Supreme Court (Erin Schaff/Reuters)

While the decision will be seen as a victory for South Dakota and other states that benefit from increased tax revenues, online shoppers will likely see significantly increased prices while checking out online.

The hardest hit, according to e-commerce lawyer Chris Cox, will be small online businesses, who depend on not paying state taxes to undercut traditional brick and mortar stores.

“Consumers will quickly feel the negative effects as those businesses dry up or are forced into the arms of Internet giants,” Mr Cox said.

South Dakota estimated that it could collect an extra $34 billion per year in revenue if allowed to tax internet sales, however the General Accounting Office put the figure closer to $13 billion.

The ruling comes against a backdrop of Trump’s criticism of Amazon, the leading player in online retail, on the issue of taxes and other matters.

Share prices of major online retailers – including Amazon and eBay – fell sharply on the news.