Melbourne has been ranked the second "most fun" city in the world while Sydney has placed third last in a survey by Time Out.

The magazine's City Index surveyed 20,000 people in 18 global population hubs with 81 questions focused on six key characteristics, with respondents coming back with some surprising results.

Melbourne came in second place behind Chicago in the US, the Midwest metropolis rating high for its strong community spirit, friendliness and affordable living.

View photos Sydney was voted one of the least fun cities in the world, while Melbourne ranked second best. More

View photos Chicago was rated 'most fun' in the Time Out City Index survey. Source: More

View photos Melbourne is the place to be, survey finds. Source: 7 News More

While neither city can boast a good beach, denizens rated the cities high for their quality food and drink, with 73 per cent of Melburnians saying they loved living in their city, more than any other.

Sydney meanwhile landed third last for fun of the 18 cities, ranking only above Dubai and Kuala Lumpur.

Given Dubai's location in the middle of the desert, KL's often-thick blanket of smoke – and that neither city has ever been known for having a vibrant nightlife – Sydney siders are in a very sorry state.

View photos The Windy City topped the list for friendliness, food and drink. More

Story continues