A massive explosion at a warehouse has rocked the northern Chinese city of Tianjin, killing seven people and injuring hundreds of others, state media reported.

The exact cause of Wednesday's blast in an industrial area was not immediately known, but the People's Daily newspaper reported that it was sparked by "combustible and explosive goods" stored at a warehouse.

The paper said 300-400 people had been taken to hospital and that tremors from the blast could be felt 10km away.

The official Xinhua news agency said the explosion happened at 11:30pm local time, when a deafening bang was heard as plumes of flame that lit up the sky could be seen from afar.

#Tianjin death toll rises to 7 according to People's Daily weibo. Some are still trapped in fire due to second blast. pic.twitter.com/gDRrMp63UB — People's Daily,China (@PDChina) August 12, 2015

The area where the blast happened has many factories but also apartment buildings.

According to the Tianjin Public Security Bureau, the blast happened at the Tianjin Dongjiang Port Rui Hai International Logistics Company, which handles the transport of hazardous goods.

State broadcaster CCTV said firefighters had brought the ensuing fire under control, although it was still burning. It said the firefighters were combing the neighbourhood for possible injured residents.

Videos posted on Weibo, a Chinese social network, showed a massive fireball shooting into the air and at least two separate explosions.

The China Earthquake Networks Center reported that the first explosion had a 2.3 degree magnitude, and the second had a 2.9 degree magnitude.

The magnitude of the first explosion was the equivalent of detonating three tonnes of TNT, the China Earthquake Networks Centre said, while the second was the equivalent of detonating 21 tons of the explosive.

Tianjin, which lies about 140km southeast of Beijing, is one of China's biggest cities, with a population of nearly 15 million people according to 2013 figures. It is a manufacturing centre and a major port for northern China.

China has a dismal industrial safety record as some owners evade regulations to save money and pay off corrupt officials to look the other way.

In July, 15 people were killed and more than a dozen injured when an illegal fireworks warehouse exploded in the northern Hebei province.

At least 71 were killed in an explosion at a car parts factory in Kunshan, near Shanghai, in August 2014.