linguistic:paraphrasing
Shanghai is a direct-administered municipality and the most populous urban area in China. The city is located on the Chinese shoreline on the southern estuary of the Yangtze River, with the Huangpu River flowing through it.

The population of the city proper is the third largest in the world, with around 24.87 million inhabitants in 2023, while the urban area is the most populous in China, with 29.87 million residents. As of 2022, the Greater Shanghai metropolitan area was estimated to produce a gross metropolitan product (nominal) of nearly 13 trillion RMB ($1.9 trillion). Shanghai is one of the world's major centers for finance, business and economics, research, science and technology, manufacturing, transportation, tourism, and culture. The Port of Shanghai is the world's busiest container port.

Originally a fishing village and market town, Shanghai grew in importance in the 19th century due to both domestic and foreign trade and its favorable port location. The city was one of five treaty ports forced to open to European trade after the First Opium War, which ceded Hong Kong to the United Kingdom. This followed the Second Battle of Chuenpi in 1841, more than 60 km (37 mi) east of the Portuguese colony of Macau. Macau was controlled by Portugal following the Luso-Chinese agreement of 1554. The Shanghai International Settlement and the French Concession were subsequently established. The city then flourished, becoming a primary commercial and financial hub of Asia in the 1930s. During the Second Sino-Japanese War, the city was the site of the major Battle of Shanghai. After the war, the Chinese Civil War soon resumed between the Kuomintang (KMT) and the Chinese Communist Party (CCP), with the latter eventually taking over the city and most of the mainland. From the 1950s to the 1970s, trade was mostly limited to other socialist countries in the Eastern Bloc, causing the city's global influence to decline during the Cold War.

Major changes of fortune for the city would occur when economic reforms initiated by paramount leader Deng Xiaoping during the 1980s resulted in an intense redevelopment and revitalization of the city by the 1990s, especially the Pudong New Area, aiding the return of finance and foreign investment. The city has since re-emerged as a hub for international trade and finance. It is the home of the Shanghai Stock Exchange, the largest stock exchanges in the Asia-Pacific by market capitalization and the Shanghai Free-Trade Zone, the first free-trade zone in mainland China. Shanghai has been classified as an Alpha+ (global first-tier) city by the Globalization and World Cities Research Network. As of 2024, it is home to 13 companies of the Fortune Global 500 and is ranked 4th on the Global Financial Centres Index. The city is also a global major center for research and development and home to numerous Double First-Class Universities. The Shanghai Metro, first opened in 1993, is the largest metro network in the world by route length.

Shanghai has been described as the "showpiece" of the economy of China. Featuring several architectural styles such as Art Deco and shikumen, the city is renowned for its Lujiazui skyline, museums and historic buildings including the City God Temple, Yu Garden, the China Pavilion and buildings along the Bund. The Oriental Pearl Tower can be seen from the Bund. Shanghai is also known for its cuisine, local language, and cosmopolitan culture, ranks sixth in the list of cities with the most skyscrapers, and it is one of the biggest economic hubs in the world.