Hamburg is supposed to be a save city even with one of the highest criminal rates in Germany. This may be so high because of drug delicts. It is not well known that it used to be as easy as in Amsterdam to get drugs. But if you do nothing you would not do at home you should be absoltely safe.
For Girls: Like in Scandinavia there is only a little danger that you may be harrassed.