PurposeThis research examined the direct and indirect effect of university social responsibility (USR) on student loyalty through the mediation of service quality and university image.Design/methodology/approachThe sample includes 35 students from Universitas Sarjanawiyata Tamansiswa, a private university, and 74 respondents from Universitas Sebelas Maret Surakarta, a state university, totaling 109 respondents. The data were obtained by sending a questionnaire in the form of Google Docs through the student WhatsApp groups at the universities. Furthermore, the four variable constructs were tested with loading factors to determine reliability, and Cronbach’s alpha was used to determine the construct validity. The research hypotheses were tested via path analysis using the WarpPLS 8.0 statistical tool.FindingsThe results showed that the image of the university mediates the relationship between USR and student loyalty. Meanwhile, service quality does not mediate the relationship. The USR had a direct relationship with service quality, university image and student loyalty. The image of the university also had a direct effect on student loyalty, while service quality had an insignificant effect on student loyalty. Therefore, based on the coefficient value, the indirect effect between USR and student loyalty through the image of the university is stronger than the direct effect between USR and student loyalty.Originality/valueSeveral previous models examined the relationship between corporate social responsibility (CSR) and consumer loyalty in general, but this research has applications in the education sector with a different concept, namely USR with different measurements.