Shanghai has a humid subtropical climate and experiences four different seasons. The peak season in Shanghai is during the Summers but it can really be hot and wear you down. So the best time to visit Shanghai is during the seasons of Spring and Autumn, when the climate is ideal.
Spring (March - May): Spring is the most pleasant season in Shanghai as the flowers start to bloom and fill the city with its charm.
Summer (June - August): Summers in Shanghai are hot and humid. There will occasional downpours, severe thunderstorms, and at times typhoons too.
Autumn (September - October): As Autumn sets in, the mercury level starts to drop signaling the arrival of winter. Shanghai's Autumns are mostly sunny and dry and the average temperature is around 22 degree Celsius.
Winters (November - February): Visiting Shanghai during the winters is one of the best decisions to make. With north-westerly winds blowing from Siberia, the winters are chilly and damp and the temperature goes below freezing levels. There will be one-two days of snowfall too.
Carry an umbrella and raincoats with you all the time while visiting Shanghai, as the climate tends to change drastically and the chances of having a rain is always high.