The attack took place at noon at an informal daycare center in Shanghai's suburban Minhang district, home to many migrant workers.
The female attacker was taken into custody and police were investigating, said Zhuang Liqiang, an officer in the information services department of the Shanghai Public Security Bureau. He did not provide further details.
Of the eight children sent to the hospital for treatment, four suffered light injuries and one was relatively seriously hurt, but none faced life-threatening injuries, the official Xinhua News Agency and local reports said.
The reports said the attacker had suffered a "psychotic episode."
Shanghai's Dragon TV showed children's clothing at the hospital covered with blood. Doctors said they had to cut off the clothes quickly to treat their injuries.
Chinese schools and nurseries have increased security following a spate of gory rampages in schools and other public places in recent years that left dozens of people dead and injured.
Migrant workers often struggle to find decent childcare for their children, who are not usually qualified to attend city public schools and often cannot afford the high fees charged by private facilities. With tens of millions of parents working far from their rural homes in big cities, families are often split, the children only loosely supervised or looked after by grandparents and other relatives.
The problem has been worsened by local moves to close down informal schools and nurseries set up in cities to cater to migrant families, ostensibly due to safety concerns.