It was the Chinese mainland's 11th confirmed human death from bird flu and the first in Shanghai, the country's biggest city, according to the World Health Organization.
The migrant worker, who was identified only by the common surname Li, died Tuesday at a Shanghai hospital after suffering a fever and cold symptoms.
Blood tests by China's national Center for Disease Control confirmed Li had bird flu, the Health Ministry said in a statement carried by the official Xinhua News Agency. It said the tests were conducted in line with WHO standards and results were reported to the agency.
Authorities haven't said how the woman might have contracted the virus or said where her hometown is. No bird flu outbreaks in poultry have been reported in Shanghai since 2004.
People who had close contact with Li were placed under observation but none has shown disease symptoms, Xinhua said.
Worldwide, the virus has killed more than 100 people in eight countries, mostly in Asia, according to WHO.
Tests on an Indonesian girl who died Thursday showed she had the H5N1 strain, said Hariadi Wibisono, a Health Ministry director. He said she fell ill after coming into contact with dead poultry.
A swab and blood sample have been sent to a WHO-sanctioned laboratory in Hong Kong for confirmation, Wibisono said.
The girl would be Indonesia's 23rd human death from bird flu, he said.
A falcon in Hong Kong was found Tuesday near the border with mainland China, and laboratory tests confirmed it had the H5N1 strain, according to the Agriculture, Fisheries and Conservation Department.
Hong Kong hasn't reported a human case of bird flu since 2003.
More than 6,000 dead birds have been tested for bird flu in Hong Kong since late October, according to the government. Of those, two chickens and 14 wild birds were confirmed to have the H5N1 virus.
China has reported 16 human cases and dozens of outbreaks in chickens, ducks and other poultry in areas throughout the country. The government has destroyed millions of farm birds to contain outbreaks.
Most of China's human infections have been traced to contact with sick or dead birds. Experts say the virus might be spread by millions of migratory birds that cross China.