Shanghai is one of the four municipalities in China which are directly administered by the central government. The city has a long history of attracting domestic migrants from all over China, however the Chinese government has sought to limit population growth in the city. In 2017, the government initiated a development plan for Shanghai, setting a population target of around 25 million by 2035. The feasibility of this plan has been questioned by critics, citing the need for continued immigration in order to support the rapidly aging population of the city. In 2019, Chinese government figures indicated that the administrative area of the city was home to a resident population of around 24.2 million people. However, according to estimates by the United Nations, the number of inhabitants in Shanghai's urban area, which denotes the contiguous built-up area of the city, reached 26.3 million in 2019 and are likely to continue to grow into the future.
Shanghai has the largest GDP of all cities in China. After the opening of China and the establishment of the Pudong Special Economic Zone, Shanghai experienced double-digit GDP growth since 1992 and developed into one of the most economically advanced regions in China. The city hosts important shipbuilding and automobile industries, but the industrial sector's share of GDP is shrinking steadily and the service sector already accounted for 70 percent of the GDP in 2019, which is a much higher value than in most other parts of China. Shanghai has a long tradition as a hub of international trade and finance. Many Chinese headquarters of international companies are based in Shanghai and a considerable part of the international trade of the Yangtze river delta is handled in Shanghai's ports. The city is the home of the Shanghai Stock Exchange, one of two stock exchanges in China, and the financial sector experiences one of the highest sectoral growth rates of the city's economy.
Despite Shanghai's economic importance, GDP growth cooled down in recent years and other Chinese cities are catching up. In 2013, the central government approved the establishment of the China (Shanghai) Pilot Free Trade Zone, which further facilitates the investment and operation of foreign companies in Shanghai. The city government announced a far-reaching “Shanghai Master Plan 2017-2035” in 2018, which aims to further develop Shanghai as the leading economic hub of the Yangtze river delta and substantially improve the living conditions of its citizens.