In a decree published by state media, Assad commuted some death sentences to life imprisonment, reduced jail terms for many offences and canceled some others altogether.
Foreigners who entered the country "to join a terrorist group or perpetrate a terrorist act" would receive an amnesty if they surrender to authorities within a month, the decree said. Kidnappers who free their hostages and army deserters would also be covered, it said.
Assad has issued several amnesties since protests against his rule erupted in March 2011. The demonstrations triggered a crackdown by his security forces and the conflict descended into a civil war which has killed more than 160,000 people.
Opponents say only a fraction of detainees were released in previous amnesties, leaving many thousands of people including political opponents and activists as well as ordinary criminals in prison, where they say many are subjected to abuse.
Former peace envoy Lakhdar Brahimi, who stepped down at the end of May after the failure of peace talks in Geneva, said he had presented Assad with a list of prisoners whose release the opposition have demanded.
"He knows that there are 50,000 to 100,000 people in his jails and that some of them are tortured every day," Brahimi told the German magazine Der Spiegel in an interview published at the weekend.
Monday's decree set out several exemptions to the amnesty, without specifying which offences they covered.
Rebels fighting to topple Assad have also taken thousands of captives. The U.K.-based Syrian Observatory for Human Rights urged the Islamic State in Iraq and the Levant rebel group on Saturday to free more than 2,000 detainees, including 150 Kurdish school children it said ISIL abducted last month.
Assad's decree said prisoners aged over 70 or suffering from incurable diseases would be freed. Drug and weapons smugglers would have their jail term reduced, as would prisoners convicted of economic crimes.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now