Police took action to push protesters away from the city's Taksim Square, a focal rally point, an AFP reporter said.
Protesters responded by hurling fireworks at police, who detained dozens of people, according to media reports.
"Government, resign!" the demonstrators chanted. "Do not touch my Internet!"
"Everywhere is Taksim, everywhere is resistance," they shouted, echoing a chant often heard during the huge anti-government protests that swept the country in June.
The controversial law came into effect last Wednesday after it was signed by Turkish President Abdullah Gul despite repeated calls for a veto.
More From This Section
The new curbs have sparked alarm at home and abroad, with critics saying they are an attempt to stifle dissent and stop evidence of high-level corruption being seen online.
Earlier today, Prime Minister Recep Tayyip Erdogan again denied accusations of online censorship, to a crowd of several thousand supporters in the city of Sivas.
"We are not against the Internet, we are against the 'immoral' items on the Internet," Erdogan said at a rally marking the kick-start of his party's local election campaign.
The legislation came as Erdogan deals with a wide-ranging graft scandal that erupted in mid-December, implicating his inner circle.
The embattled premier has accused US-exiled Muslim cleric Fethullah Gulen, whose supporters hold key positions in the police and the judiciary, of instigating the probe ahead of local polls on March 30.
His government has taken a series of retaliatory measures, including a mass purge of police and prosecutors and legislation reforming the judiciary.