Promoted by the rightwing government, the new law introduces a wide range of new offences and has been condemned by the opposition and civil rights groups as excessive.
Its supporters see it as a major step forward in the country's fight against crime - a key issue at recent national elections.
But the opposition Socialist Party has dismissed the law as ineffective and says it will appeal to the Constitutional Council - France's legislative guarantor.
Jacques Maheasa, a representative of the Socialists, said the law would not make any contribution to fighting juvenile delinquency as the thinking behind it was "excessively repressive".
Interior Minister Nicolas Sarkozy, however, said his bill would "install a sense of security in France".
The Senate passed the bill on Thursday after its adoption by the National Assembly the previous day.
Under the new law:
On the other hand, foreign prostitutes who agree to inform on their pimps may receive all-important temporary residence permits in return.
Election issue
The new law also bolsters police powers, widening, for example, the right to conduct vehicle searches.
Fighting crime is a key plank in the rightwing government's platform, with many commentators attributing the rout of the Socialist government in 2002 to a rising sense of insecurity in France.
Only weeks before the presidential election, President Jacques Chirac stormed out of a Paris football stadium after some fans booed during the national anthem.
One Communist MP, Andre Gerin, said the new law was aimed against "minors, the poor and the weak".