PurposeThe study aims to delve into the influence of tourism on the happiness of city residents, grounded in the overarching concept of livability. It posits that prioritizing residents’ happiness is crucial for effectively addressing cities’ challenges in balancing development and distinctiveness. The study pursues three primary objectives: first, establishing a potential correlation between city tourism and residents’ happiness; second, examining the contributing factors to this correlation and third, identifying potential mediators that influence the connection between tourism development and residents’ happiness.Design/methodology/approachUsing a quantitative single-case design and partial least square analysis, the study underscores the intricate nature of various tourism development components. It specifically explores the roles of cognitive flexibility and social comparison in shaping the relationship between city tourism and happiness.FindingsThe findings make a distinctive contribution by revealing that not all tourism domains contribute positively to happiness. Furthermore, it sheds light on how tourism development impacts the emotional and cognitive dimensions of happiness, emphasizing the adverse effects of inequality and feelings of insecurity.Research limitations/implicationsThe study acknowledges certain constraints, including its employment of a cross-sectional design, the issue of generalizability, potential sampling bias and the reliance on subjective measurements when evaluating constructs like happiness and satisfaction with life. Using self-reported data introduces susceptibility to social desirability bias and individual perceptual differences, potentially resulting in measurement inaccuracies. Nevertheless, despite these limitations, the study’s findings offer valuable insights that contribute to both theoretical advancement and the realm of urban management.Practical implicationsThe findings elucidated through the mediation analyses conducted for hypotheses three to seven shed light on the significant roles played by mental adaptation and social comparison mechanisms in shaping individuals’ happiness. These insights substantially enhance our understanding of this field. Particularly, the dimensions of social and environmental impact within tourism appear to counterbalance the positive effects stemming from the economic and cultural aspects. This suggests a scenario where an excessive focus on tourism development could potentially undermine the overall livability of the city. These outcomes further indicate the necessity for proactive interventions by destination managers. Their efforts should be directed toward enhancing the environmental and social domains, aiming to reinvigorate the sense of community among residents, which appears to be gradually waning.Social implicationsThe outcomes of this study emphasize the utmost significance of prioritizing residents’ happiness above mere considerations of economic growth when formulating efficacious strategies for tourism. By concentrating on the happiness of the local population, a harmonious resonance is established with Sustainable Development Goal 11, which advocates for the creation of habitable cities founded upon the principle that “a city that is not good for its citizens is not good for tourists.” This alignment underscores the interconnected nature of residents’ happiness and the sustainable development of tourism. Moreover, residents’ happiness plays a pivotal role in addressing the challenge that cities face in harmonizing growth and their uniqueness, ensuring competitiveness and sustainability.Originality/valueThe research underscores the need for a people-oriented perspective in urban planning and tourism development initiatives. The study identifies diverse factors impacting residents’ happiness in city tourism, highlighting the complex interplay of environmental, cultural and socioeconomic elements. It emphasizes income’s role but underscores nonmaterial factors and individual preferences. Overall, the study offers timely and valuable insights into the intricate connection between tourism development, residents’ happiness, living conditions and human perception, guiding urban planners and stakeholders.