"The ground should be prepared for holding an absolutely free election with no preconditions," Rouhani told visiting Iraqi Prime Minister Nuri al-Maliki, the presidency website reported on Thursday.
Rouhani, whose country backs Syrian President Bashar al-Assad, said the conference should also aim for the "complete expulsion of the terrorists from Syria."
"It is our mutual responsibility to defend the ideals and demands of the Syrian nation in all international conferences," especially at the so-called Geneva 2, he said.
On Monday, international peace envoy Lakhdar Brahimi called for both Iran and Saudi Arabia, which supports the armed rebels, to be invited to the peace talks initiated by Moscow and Washington.
The government in Damascus, meanwhile, has said Assad will remain president and lead any transition agreed at the conference scheduled for January 22.
The opposition and rebels fighting the government insist Assad play no role in a transition.
At his meeting with Rouhani, Maliki hailed the nuclear deal between Iran and world powers in late November, saying it will contribute to the region's stability.
"This agreement is important ... for Iran and regional countries, and the Iraqi government is hopeful of witnessing the long-term impact of this agreement on regional stability," he said, quoted by the presidency.
BA/BA