France has approved a digital services tax despite threats of retaliation by the US, which argues that it unfairly targets American tech giants.
The 3% tax will be levied on sales generated in France by multinational firms like Google and Facebook.
The French government has argued that such firms headquartered outside the country pay little or no tax.
The US administration has ordered an inquiry into the move - which could result in retaliatory tariffs.
The new tax was approved by the French senate on Thursday, a week after it was passed by the lower house, the National Assembly.
Any digital company with revenue of more than €750m ($850m; £670m) - of which at least €25m is generated in France - would be subject to the levy.
It will be retroactively applied from early 2019, and is expected to raise about €400m this year.
At present, they are able to pay little or no corporate tax in countries where they do not have a large physical presence. They declare most of their profits where they are headquartered.
The European Commission estimates that on average traditional businesses face a 23% tax rate on their profits within the EU, while internet companies typically pay 8% or 9%.
France has long argued that taxes should be based on digital, not just physical presence. It announced its own tax on big technology firms last year after EU-wide efforts stalled.
An EU levy would require consensus among members, but Ireland, the Czech Republic, Sweden and Finland raised objections.
France's new 3% tax will be based on sales made in the country, rather than on profits.
About 30 companies will pay it - mostly US groups such as Alphabet, Apple, Facebook, Amazon and Microsoft. Chinese, German, Spanish and British firms are also affected, as well as the French online advertising firm Criteo.
The French government says the tax will end if a similar measure is agreed internationally.
The big tech companies have argued they are complying with national and international tax laws.
The Trump administration denounced the move a day before the vote.
On Wednesday trade representative Robert Lighthizer said an investigation would "determine whether it is discriminatory or unreasonable and burdens or restricts United States commerce".
US Trade Representative Robert Lighthizer said President Trump ordered the investigation
The US inquiry could pave the way for punitive tariffs, which Mr Trump has imposed on several occasions since taking office.
Previous investigations launched by Washington have covered European Union and Chinese trade practices.
Defending the new tax on Thursday, French Finance Minister Bruno Le Maire said France was "sovereign and decided its own tax rules".
"I want to tell our American friends that this should be an incentive for them to accelerate even more our work to find an agreement on the international taxation of digital services," he added.
Analysis by Dave Lee, BBC North America technology reporter
This "Section 301" investigation, as it is known, has been used before as a way of eventually implementing new tariffs on countries the Trump administration feels is taking the US for a ride.
If France is going to take hundreds of millions of euros from the pockets of American tech giants, the US argument might be, then why shouldn't the US earn more money from what the French do in the US? It took the same view with China and has buried itself in a trade war that has destabilised relations and has the potential to escalate even further.
The digital tax is a risk for France, for it is now isolated. There had been talk of a Europe-wide tech tax, but talks fell down thanks in part to opposition from countries such as Ireland, which has benefited from being able to attract tech firms to set up their European base in the country. Other countries - such as the UK, Spain and Austria - are considering similar moves, but France is furthest along.
One thing all sides agree on, however, is that in our modern, digital economy, the overhaul of how companies are taxed is long overdue.
France will be hoping for one of two outcomes. Either countries follow their lead and implement their own, independent laws, limiting France's exposure. Or the move gives added energy to calls for a multilateral agreement on how digital firms should be taxed globally, putting an end to the squirreling-away of vast sums of money made by internet giants.