The purpose of this study is to analyze the influence of environmental knowledge, environmental concern, and social media on green purchasing intention and how the mediating role of green attitude as an intermediary of the relationship between the three independent variables on green purchasing intention of generation Z in Malang City. The research method uses quantitative descriptive with data collection from direct questionnaire distribution and google form to generation Z Malang City aged 17-27 years. The sampling technique is purposive sampling with a total of 154 respondents. The data analysis technique uses PLS-SEM with the help of the SmartPLS application. The findings of this study indicate that environmental concern and social media have a positive effect on green attitudes, while environmental knowledge does not show a significant effect. These three factors, together with green attitudes, significantly influence green purchasing intention. Green attitudes mediate the influence of environmental concern and social media on green purchasing intention, but not environmental knowledge. The novelty of the study shows the importance of the mediating role of green attitudes in predicting the influence of social media on green purchasing intention which has theoretical implications for including social media in the TPB model for further research. Practical implications require educational institutions to maximize the Pendidikan Lingkungan Hidup (PLH) curriculum to foster high environmental morale, and policymakers need to integrate it with behavioral interventions. Companies should also implement green marketing by producing green products and building a positive consumer image.