Shanghai is about 52 times bigger than San Francisco.

San Francisco (including the city proper only) is approximately 121 sq km, while Shanghai is approximately 6,341 sq km, making Shanghai 5,140% larger than San Francisco.
Tip: This to-scale comparison of San Francisco vs. Shanghai uses the Mercator projection, which distorts the size of regions near the poles.
Our free app, MapSize by MyLifeElsewhere — compare any two places, to scale on your mobile device.