No names were immediately released in a statement from the judiciary outlining the decision, but among Iranian-American citizens in custody is Jason Rezaian, the Washington Post's Tehran correspondent.
Rezaian's lawyer, Leila Ahsan, told AFP she had not learned if her client was free. "I have no information on this," she said.
Kerry arrives in Vienna as world powers prepare to lift sanctions against Iran
However according to Fars news agency, Jason Rezaian and Saeed Abedini are among the prisoners freed by Iran.
The announcement came as Iran and world powers led by the United States were expected to finally implement last July's nuclear deal, which will lift international sanctions imposed on the Islamic republic.
As well as California-born Rezaian, sentenced to unspecified jail time last year having been tried for espionage, Iran has been holding three other Iranian-American citizens.
UN report on Iran deal compliance likely Saturday
They include pastor Saeed Abedini, in jail for three years after being convicted of undermining national security, and former US Marine Amir Hekmati, who is serving 10 years for cooperating with hostile governments.
The fourth is Siamak Namazi, a businessman arrested last year in Tehran after the nuclear deal was struck.
A fifth American, retired FBI agent Robert Levinson, went missing in southern Iran eight years ago.
PM Nawaz, army chief head to Saudi, Iran to mend rift
In exchange, seven Iranian prisoners held in the United States will be freed, official media said on Saturday.
The seven Iranians to be freed by the US are Nader Modanlou, Baharam Mekanik, Khosrow Afghahi, Arash Ghahraman, Touraj Faridi, Nima Golestaneh, and Ali Sabounchi, according Iran's judiciary and the state broadcaster.
Fourteen other Iranians wanted by the FBI would no longer be sought for prosecution by Interpol, both official media outlets said.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ