A police spokesman put the turnout at the demonstration -- the first of dozens scheduled in the runup to the summit on Friday and yesterday -- at around 10,000, while the organisers said the figure was far higher.
The protest was "completely peaceful," the police spokesman told AFP.
The gathering outside city hall took place in parallel with protests by canoeists on the nearby river Alster, while in the port of Hamburg, Greenpeace staged a climate demonstration near a ship laden with coal.
Hamburg, where summit host Chancellor Angela Merkel was born, is a bustling city that is also an anti-establishment bastion.
Also Read
Around 30 protests have been scheduled ahead of the summit, and the organisers are hoping for a total turnout of more than 100,000 people.
Hamburg is a citadel of leftwing radicals, and the authorities say they are bracing for possible clashes and property damage.
Interior Minister Thomas de Maiziere, in the Sunday edition of the daily Bild, warned that any violence "should be nipped in the bud".
Around 15,000 police will be deployed to protect the summit, in addition to 3,800 officers monitoring airport and train security.
Disclaimer: No Business Standard Journalist was involved in creation of this content