Students as the nation's successors who are expected to contribute greatly in upholding the name of the country have a role to do the best, especially accounting students in disclosing the accountability of state financial reporting, starting from simulating the understanding of several ethics courses that have been given in college. The purpose of this study is to examine the effect of understanding the accountant's professional code of ethics and idealism on the ethical perceptions of accounting students with gender roles as moderating variables. In analyzing this research using quantitative methods with purposive sampling techniques to evaluate the population of accounting students in Gresik Regency and data collection was carried out through distributing online questionnaires using a Likert scale and tested using SEM PLS MGA techniques. From going through various test processes, the results showed that Gender managed to moderate the Accountant Professional Code of Ethics strongly on the Ethical Perceptions of Accountant Students. And the Accounting Professional Code of Ethics and Idealism have a positive effect on the Ethical Perceptions of Accounting Students. However, Gender did not succeed in moderating Idealism on the Ethical Perceptions of Accounting Students.