Official media quoted an unnamed senior Iranian Intelligence Ministry official as saying the diplomats had been taken into custody during the December 27 riots but gave no further details on their fate.
Eight people were killed in clashes between opposition supporters and security forces on Ashura, the holy Shi'ite day of ritual morning, which fell on December 27.
It was the most serious violence since the aftermath of Iran's presidential election last year.
The reports came a day after German Chancellor Angela Merkel said Tehran was running out of time if it wanted to avoid further sanctions over nuclear activities the West suspects are aimed at making bombs.
Iran denies the charge and has accused the West, especially the United States and Britain, of helping to foment street unrest that erupted after its disputed election in June.
The Iranian official said the German diplomats' role in the protests had been proven, ISNA news agency reported. He added that a network whose members were also arrested during Ashura had links to German intelligence.
They had links with German diplomats via a female member and exchanged information at their meetings or parties, the official said, adding Iran planned to lodge a formal protest.
The German embassy ... should explain why its personnel had relations beyond diplomatic norms with Iranian citizens. The official was identified as a deputy intelligence minister.Asked about the reports at a government news conference, German foreign ministry spokesman Andreas Peschke rejected said: I cannot comment in detail. But if the accusations are in fact made in this form, then we reject them.
On December 27 no German diplomats were arrested, according to the information we have, he said, adding that he was unaware of arrests at any time since then.
An Iranian prosecutor said on Jan 9 that a German citizen detained during Ashura had been freed, but gave no details. Other reports said a European diplomat was held for 24 hours.
SIEMENS REJECTS IRAN ORDERS
The reformist opposition says the presidential vote, which was followed by huge opposition protests, was rigged to secure President Mahmoud Ahmadinejad's re-election. The authorities deny this.
Officials have portrayed the protests as a foreign-backed bid to undermine Iran's Islamic system of government.
The Ashura riots were pre-planned and elements of the sedition movement, anti-revolutionary forces and networks linked to foreign intelligence were present, ILNA news agency quoted the intelligence official as saying.
In early January Iran said several foreigners conducting psychological warfare against the clerical system were arrested during the Ashura clashes.
Iranian authorities have repeatedly accused opposition leaders of links to foreign enemies, warning that they will not tolerate any more anti-government rallies.Despite this, Internet messages have been circulating about new protests on February 11, when Iran marks the 31st anniversary of the Islamic revolution that toppled the U.S.-backed Shah.
The accusations of German involvement in the Ashura protests came a day after German engineering conglomerate Siemens said it would reject any further orders from Iran as world powers consider imposing new sanctions on Tehran.
Germany, one of six countries seeking to persuade Iran to suspend its atomic work, is one of the biggest exporters to Iran despite three rounds of modest United Nations sanctions.
Iran ignored a U.S. end-2009 deadline to respond to an offer from world powers of economic and political incentives in exchange for halting enrichment or face more sanctions.
(Writing by Fredrik Dahl; Editing by Noah Barkin)