The longer sentences result from a judicial explanation covering such cases that the Supreme People's Court and the Supreme People's Procuratorate issued in May 2013.
In six cases on Monday, courts found 10 people guilty of food safety violations. The average of the prison sentences handed down was 5.63 years, compared with an average of 3.13 years for 15 similar cases between 2011 and May 2013.
The six cases on Monday included the use of illegal chemicals and the sale of expired foods such as pork, oil, mooncakes, and crawfish, affected many people, said Xiao Wanxiang, presiding judge of a criminal tribunal at Shanghai High People's Court.
In one case, Ni Xiaogang, the manager of Shanghai Gurun Trade Co Ltd and Shanghai Ruijun Industrial Trade Co Ltd, was sentenced to 13 years in prison, four years more than the longest sentence previously given for such a case.
Ni bought tallow oil from Australia and New Zealand fully knowing that it was suitable only for industrial use. He then sold it to an edible oil producer, Shanghai Shiming Oil, between February 2010 and January 2012, making more than 37 million yuan ($6.07 million) in profit.
The previous record prison sentence of nine years was handed to Ye Weilu, general manger of a food company that produced and sold more than 270,000 packets of steamed buns containing prohibited dyes. He was found guilty and sentenced in September 2011.
Fines for offenders have also been raised from 283,000 yuan to more than 3.74 million yuan on average. None of those convicted in the six cases judged on Monday received a suspended sentence, in contrast with six suspended sentences between 2011 and May 2013.
"Since the judicial explanation was published, Shanghai courts have abided by the principle of applying heavy penalties, while limiting the use of non-custodial sentences," said Zou Bihua, vice-president of the Shanghai High People's Court.
In one case, Mr Bihua said, the defendant Zhang Ruguo received six years in prison for selling nearly seven tons of expired moonmakes, making a profit of more than 100,000 yuan.
Under the law, Zhang would have received no more than five years in prison if the court had considered only the amount of money involved, Mr Bihua said.
"But the court felt that the costs involved in reselling the expired mooncakes were low, and the number of mooncakes sold indicated that many people had been harmed by the unhealthy food. So we identified this as a serious crime and gave him the sentence," Mr Bihua said.
When police previously raided small restaurants and found them selling food products containing prohibited ingredients, the fines were usually around 1,000 yuan, because the total amount of tainted food sold was hard to trace. But such fines have now been raised to between 40,000 and 50,000 yuan, Mr Bihua added.
Some legal experts have applauded the tougher sentences.
"Food safety is a basic element of daily life, and law enforcement agencies should have zero tolerance and work with other watchdogs to deter violators," said Qiu Baochang, head of the lawyers group of the China Consumers' Association.