The Senate gave its approval for the bill, which had already been unanimously backed in the lower house National Assembly, and it is expected to be signed into law by President Francois Hollande within the next two weeks.
(Also see: Amazon a "destroyer" of bookshops, says France)
The bill bans online giants such as Amazon from delivering books without charge, but still allows them to set discounts of up to five percent, the maximum allowed under existing French legislation.
(Also see: France seeks to ban Amazon book bundle discounts, free delivery)
In 1981 the government ruled that publishers must set a standard selling price for their books in a bid to protect small retailers and set a limit of five percent on any discount.
Culture Minister Aurelie Filippetti welcomed the parliamentary approval, saying it showed "the nation's deep attachment to books."
While the measure adopted on Thursday is not specifically aimed at Amazon, Filippetti has singled out the US giant's practices in the past, attacking both free deliveries and the firm's tax arrangements.
The online retailer reports its European sales through a Luxembourg-based holding company, taking advantage of the duchy's relatively low corporate tax rates for earnings outside its borders.
Amazon insists the arrangement, which has been criticised by politicians across Europe, is legal under the European Union's single market rules.
Filippetti has also attacked Amazon for its "dumping strategy" and for selling books at a loss.
"Once they are in a dominant position and will have crushed our network of bookshops, they will bring prices back up," she said last year.
France is proud of a network of bookstores it says is "unique in the world" and crucial for culture to reach small towns.
The country has about 3,500 such stores including 600 to 800 so-called independent retailers that do not belong to a publishing house, a chain or a supermarket compared to just 1,000 in Britain.
Get your daily dose of tech news, reviews, and insights, in under 80 characters on Gadgets 360 Turbo. Connect with fellow tech lovers on our Forum. Follow us on X, Facebook, WhatsApp, Threads and Google News for instant updates. Catch all the action on our YouTube channel.
Supernova’s First Moments Show Olive-Shaped Blast in Groundbreaking Observations
Intense Solar Storm With Huge CMEs Forced Astronauts to Take Shelter on the ISS
Nearby Super-Earth GJ 251 c Could Help Learn About Worlds That Once Supported Life, Astronomers Say
James Webb Telescope May Have Spotted First Generation of Stars in the Universe