"So far, 40 foreign nationals have been arrested for their involvement in the protests," Iran's judiciary spokesman Masoud Setayeshi told a televised news conference cited by the state news agency IRNA.
He, however, did not provide details about their nationalities.
Iran has been rocked by sweeping protests since September over the death of a 22-year-old woman, Mahsa Amini, in the custody of Iran's morality police.
A string of attacks by armed protesters on security personnel has been reported across the country, with more than a dozen killings of policemen and paramilitary Basiji forces.
Iranian authorities have blamed the Western countries, in particular the US, for stoking unrest in the country.
So far, six people have been sentenced to death in preliminary verdicts by a court in Tehran while many others have been given jail terms ranging from 5 to 10 years.
Source: Anadolu Agency