The tax system serves as a means for the government to generate additional revenue necessary to fulfill its obligations. The objective of this study was to examine the impact of the Theory of Planned Behavior (TPB) on taxpayer compliance in Yogyakarta, with tax socialization serving as a moderating variable. The research was conducted within the city of Yogyakarta and involved 110 taxpayer respondents. The consecutive sampling method was employed as the sampling technique, and data analysis was performed using partial least squares (PLS) analysis with SmartPLS 3.3.3 software. The findings of the study indicate that moral obligation and trust in the government do not have a significant influence on taxpayer compliance, while tax awareness demonstrates a significant effect on taxpayer compliance. However, tax socialization was unable to moderate or strengthen the impact of moral obligation, trust in the government, and tax awareness on taxpayer compliance in Yogyakarta.