Weather in Shanghai is generally mild with four seasons. Summer is hot and humid with strong sunshine while winter is cold and dry. The best times to visit Shanghai are spring and autumn. However be aware that the huge crowds could appear at the airport, tourist sites, shopping areas, restaurants, and hotels during the Chinese New Year (usually falls in January or February), International Labor Day (May 1) holidays and National Day (Oct 1) holiday.
Spring comes in March to May when flowers bloom. The weather of spring is comfortable in Shanghai. In spring, Pudong (peach blossom), Qingpu (plum blossom), Fengxian (rape flower) are all good place to go outing. June to July comes the rain season, and July to August is wet and hot. September to November is the best season to taste crab, Yangcheng Lake crab is the top recommendation. Winter from December to February is cold and dry with occasional snow.