The two men, aged 36 and 49, were reported to police by two security guards after they gave Hitler salutes as they posed for photographs outside the German Reichstag, the historic parliament building in Berlin.
The men were detained on Saturday for "using the symbols of anti-constitutional organizations" a police spokeswoman said. They were questioned at a local police station and released after paying a €500 ($589) fine.
The Hitler salute has been banned in Germany since the end of the Second World War. The use of the salute and other symbols of anti-constitutional organizations is a crime according to the German penal code, punishable with a fine or up to three years in prison.
The law covers gestures, flags, badges, uniforms and slogans, and is most often used to prosecute members of banned far-right groups. A similar law applies in Austria.