Initially, there had been separate measures for the eastern and western sides, but the whole city is now subject to indefinite restrictions.
Shanghai is the largest single city to be locked down to date.
The important financial hub has battled a new wave of coronavirus infections for more than a month.
Reported cases have risen to more than 13,000 a day, although the numbers are not high by some international standards.
Residents in some areas of the city said the strict policy meant no-one was allowed to leave their housing compounds, not even to collect essential provisions.
They reported difficulties in ordering food and water online, with restrictions on when customers are able to place their orders, because of a shortage of supplies and delivery staff.
The city is testing the limits of China's zero-Covid-19 strategy, amid growing public anger over quarantine rules.
The policy sets China apart from most other countries which are trying to live with the virus.
But the increased transmissibility and milder nature of the Omicron variant has led to questions over whether the current strategy is sustainable in the long run.
"Currently, Shanghai's epidemic prevention and control is at the most difficult and most critical stage," said Wu Qianyu, an official with the municipal health commission.
"We must adhere to the general policy of dynamic clearance without hesitation, without wavering."
On Monday, Shanghai reported a record 13,086 new asymptomatic coronavirus cases, after a city-wide testing programme took samples from more than 25 million people in 24 hours.
At least 38,000 people have been deployed to Shanghai from other regions, in what state media have said is the biggest nationwide medical operation since the shutdown of Wuhan in early 2020.