Demonstrators threw fireworks and stones at police cordoning off Taksim Square, the city’s main square.
President Abdullah Gul is under pressure not to ratify the legislation.
The new legislation includes powers allowing authorities to block websites for privacy violations without a court decision.
The opposition says it is part of a government attempt to stifle a corruption scandal.
PM Recep Tayyip Erdogan has denied accusations of censorship, saying the legislation would make the internet “more safe and free”.
The Turkish parliament approved the bill last week.
As well as allowing Turkey’s telecommunications authority to block websites without first seeking a court ruling, it will also force internet providers to store data on web users’ activities for two years and make it available to the authorities.
Internet access in Turkey is already restricted and thousands of websites blocked.
Recep Tayyip Erdogan has been openly critical of the internet, describing Twitter as a “scourge” and condemning social media as “the worst menace to society”.
Both Twitter and Facebook were widely used by anti-government protesters to spread information during demonstrations last year.
The corruption scandal broke in December with the arrest of businessmen close to the prime minister and three ministers’ sons.
Since then, Recep Tayyip Erdogan’s government has sacked hundreds of police officers and executives from banking and telecoms regulators and state television.
Recep Tayyip Erdogan says the scandal is an attempt by a US-based cleric with influence in the police and judiciary to unseat him. The cleric, Fethullah Gulen, denies this.
P7aN2UMIavEImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…