About 30 demonstrations have been registered in Hamburg before and during the summit, which will take place on July 7th-8th.
Most are expected to be peaceful, but some, with mottos such as "Shut Down G20" and "G20 - Welcome to Hell", are considered likely to escalate. Some activists have vowed to blockade access to the summit venue and use other methods of "civil disobedience".
Police expect a hard core of 7,000 to 8,000 "leftwing extremists" who may turn violent.
A detainee holding centre has been set up with space for 400 persons, and detention judges will be on hand.
"It will be the biggest operation in the history of Hamburg's police," said the city-state's police spokesman Timo Zell.
Protesters have voiced anger about Hamburg being turned into a police "fortress", including a ban on demonstrations during the summit in most of the city centre and along roads to the airport, an area of 38 square kilometres.
Chancellor Angela Merkel on Thursday urged protesters to remain peaceful.
Merkel told parliament that "we know there will be protests, and that is more than legitimate in a democracy".
"But I hope, for the sake of the citizens of Hamburg and the security forces... that these protests will be peaceful".