BackgroundPerception of nursing roles among nursing students significantly influences their active engagement in nursing processes and care delivery. However, there is evidence to suggest that students’ interest in and perceptions from the nursing profession at the undergraduate level are often insufficient.ObjectiveThis study aimed to assess nursing students’ perceptions of nursing role function and identify areas that require improvement.MethodsA cross-sectional study was conducted in 2021 among nursing students in the third- and fourth-years from three faculties in the Ardabil Province. The participants were selected through census sampling. The data were collected through interviews with the Standardized Professional Nursing Role Function (SP-NRF) questionnaire. Statistical analysis was performed using the SPSS-18 software at a significance level of less than 0.05.ResultsA total of 320 nursing students participated in this study. The mean score for nursing role perception was 223.1 ± 20.3 out of 255. The results indicated significant gender differences in the mean scores of perception of the nursing role function, particularly in the supportive, professional-moral care, and professional-educational dimensions. Women scored significantly higher than men did (P < .05). Additionally, students who obtained a mean score of 19 to 20 (A) had significantly higher total scores in perception of the nursing role function than other students. Furthermore, a positive correlation was observed between students’ interest in nursing and their perceived ability with nursing role perception (r = .282, P < .01) and all its dimensions.ConclusionOverall, nursing students demonstrated a favorable perception of nursing role function. However, their perception of mental and spiritual care was relatively weak. These findings highlight the need to review nursing education programs and incorporate the spiritual care dimension to enhance students’ understanding of and preparation for their role as nurses.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12912-023-01389-4.