French officials said the law is aimed at preventing any single media-playing software, such as Apple's iTunes or Microsoft Windows Media Player, from building a grip on the online music retail market.
Richard Cazenave and Bernard Carayon, National Assembly deputies from the ruling conservative Union for a Popular Movement party (UMP), said in a statement on Tuesday: "These clauses, which we hope will be taken up by other countries, notably at the European level, should prevent the emergence of a monopoly in the supply of online culture."
The legislation would require that online music retailers such as iTunes provide the software codes that protect copyrighted material - known as digital rights management (DRM) - to allow the conversion from one file format to another.
The legislation would also allow consumers to use software that circumvents DRMs if it were done to convert digital content from one format to another. Using such software is currently illegal in much of the world.
Apple said that if the law passes, it would lead only to increased piracy.
It said: "The French implementation of the EU copyright directive will result in state-sponsored piracy. If this happens, legal music sales will plummet just when legitimate alternatives to piracy are winning over customers."
It remains to be seen whether Apple will comply with the law, or just shut down the iTunes store in France, which would have a minimal effect on its sales.
Shaw Wu, an analyst at American Technology Research, estimates that less than five per cent of Apple's overall revenue comes from sales of iPods and iTunes songs in France.
Currently, songs bought from the market-leading iTunes service can be played on any PC or Mac and iPods or Motorola's iTunes mobile phone, but iPods are not compatible with music that uses DRM from rival companies.
The law will affect other French online music stores, such as Fnac, part of retail group PPR, and Virgin, whose French retail operations are owned by media group Lagardere.