Chengdu, in Sichuan province, came top this year in Oriental Outlook magazine's annual ranking of the 10 happiest cities in China.
Beijing and Shanghai, which both made it into the 2015 and 2016 lists, were pushed out by second-and third-tier cities.
Oriental Outlook works with the Liaowang Think Tank to do research for the ranking. This is the 11th consecutive year it has been published. More than 13.95 million people nationwide answered questionnaires evaluating 194 cities. There were 10 categories, including education, living quality, employment, environment and public security.
Wang Qiguang, deputy editor-in-chief of Oriental Outlook, said the list shows that urbanization in China has brought about significant improvements in small cities over the past five years, in areas including education, employment and medical services.
"The happiness of a city's residents depends on their living conditions, environment, and public services, and their perceptions of how they stand to benefit from the city's future opportunities," he said.
"In Chengdu, the high-tech industry has been a big provider of employment for the young, while in Hangzhou, the elderly have benefited from the growth of high quality medical services. People feel happy if they can see themselves as being valued and having a promising future," he said.
After Chengdu, the happiest cities in order were Hangzhou, Ningbo, Nanjing, Changchun, Xi'an, Changsha, Taizhou, Tongchuan and Xuzhou.
Tongchuan, Shaanxi province, appeared for the first time. The city used to depend on coal mining but has now remodeled itself as an eco-city promoting environmentally friendly industries such as village tourism.