Its aggregate output surpassed Hong Kong's in 2009 and Seoul's in 2011, and Shanghai was now around the world's 10th most productive city, Yan said.
Shanghai used to be the country's manufacturing hub, with a reputation for products such as watches, bicycles, television sets, textiles and refrigerators. The picture is changing as the city works to make more advanced products and boosts its service industry.
Last year, Shanghai's industrial production increased 2.9 percent on an annual basis to 644.6 billion yuan.
Automobile manufacturing, one of Shanghai's six pillar industries, accelerated 7 percent, and biomedicine added 7.9 percent. But the production of fine steel and machinery equipment, another two pillar industries, both fell last year due to economic restructuring aimed at reducing high-energy consuming industries.
Retail sales in the city rose 9 percent to 738.7 billion yuan in 2012, slower than 2011's 12.3 percent jump. But the value of e-commerce climbed 75.5 percent, offering hope of a strong growth point for the future.
Fixed-asset investment increased 3.7 percent to 525.4 billion yuan, among which the investment into urban infrastructure dropped 9.8 percent.
Shanghai's trade lost 0.2 percent to US$436.7 billion last year, with exports slumping 1.4 percent but imports increasing 1 percent.
Exports to the European Union were the biggest drag, the bureau said, while those to the United States and Japan increased 3.6 percent and 4.1 percent respectively.
The Consumer Price Index, the main gauge of inflation, rose 2.8 percent in 2012, stabilizing from the jump of 5.2 percent in 2011.
The Producer Price Index, the factory gate measurement of inflation, reported a 1.6 percent cut last year.
The disposable income of urban residents in Shanghai grew 10.9 percent to 40,188 yuan in 2012, while that of rural households increased 17,401 yuan, up 11.2 percent from a year earlier.
How is living in Beijing on monthly income of 10,000 yuan?