Suicide is a serious and growing public health problem and remains an unnecessary cause of death globally. In Iran, the highest prevalence of acute and chronic suicidal ideation is among young people aged 16-24. This study investigates the relationship between coping style, two types of perfectionism, and suicidal ideation among undergraduates, and examines coping style as a moderator of the relationship between perfectionism and suicidal ideation. Multi-stage cluster random sampling was employed to recruit 547 undergraduate students aged 19-24 years from the Islamic Azad University of Karaj. Structural Equation Modelling indicated that suicidal ideation was negatively associated with adaptive perfectionism and task-focused coping but positively associated with emotion-focused coping, avoidance coping, and maladaptive perfectionism. Coping style (including the three styles of task-focused, emotion-focused, and avoidance coping) was found to moderate the relationship between perfectionism and suicidal ideation. The study advances understanding of the importance of coping style in this context and explains how perfectionism affects suicidal ideation.