Judiciary spokesman Gholamhossein Esmaili said that those released include half of all “security-related” prisoners, without elaborating.
Western nations have called on Iran to release dual nationals and others held allegedly as bargaining chips in negotiations.
Among those released is Mohammad Hossein Karroubi, the son of opposition leader Mehdi Karroubi, who was in jail for nearly two months.
It is not clear if Nazanin Zaghari-Ratcliffe, a British-Iranian woman who has been jailed in Iran since 2016, will be freed as part of the release.
Coronavirus: Everything you need to know
The country has been gripped by the Covid-19 outbreak, with 998 having lost their lives to the virus, officials said on Tuesday.
Authorities have said 16,169 people have tested positive for Covid-19.
Officials have now implemented new checks for people trying to leave major cities ahead of Nowruz, the Persian New Year, on Friday, but have hesitated to quarantine the areas.
The teams check travelers' temperatures and will send those with fevers to quarantine centers. Iran has been urging people to stay home, but many have ignored the call.
Earlier this week, the UN's special rapporteur to Iran, Javaid Rehman,urged Iranian authorities to release political prisoner and prisoners of conscience.