"In light of yesterday's events in Tehran, Foreign Minister (Guido) Westerwelle decided that the German ambassador in Iran should be recalled to Berlin for consultations," a Foreign Ministry spokesman said in a statement.
Germany had already summoned the Iranian ambassador to Berlin over the incident late on Tuesday, saying Iran was bound under international law to protect foreign missions.
"We condemn the storming of the British embassy in Iran, in which the German school there was also damaged, in the strongest terms. This storming is in violation of international law, it is in no way acceptable," Westerwelle told reporters after talks with his Greek counterpart Stavros Dimas.
Westerwelle said Germany stood by Britain in "solidarity" as a European partner, and noted that international law dictates the protection of foreign embassies.
"We will stress this to Iran with absolute clarity," he said.
Britain closed its Tehran embassy Wednesday after evacuating all its diplomats from Iran as part of a "very tough" response.
European Union foreign policy chief Catherine Ashton also urged Iran earlier to fulfil international obligations to protect embassies after the "unacceptable" attack.
Protesters stormed Britain's embassy and another diplomatic compound in Tehran, trashing offices, stealing documents and defying police efforts to remove them.
Iran's Foreign Ministry expressed regret over the incident while police said several protesters who entered the embassy were arrested and would be handed over to the courts.
Germany is one of six world powers trying to convince Iran to abandon sensitive nuclear work, which they fear is part of an attempt to acquire an atomic bomb.
Tehran insists its nuclear programme is purely aimed at meeting its civilian energy needs.