Abstract Background Evidence suggests that mistreatment of medical students (MS) exists and that it is associated with stress, anxiety, burnout, substance abuse etc. Mistreatment encompasses discrimination and sexual harassment and impacts MS’ ability to partake their education with increased risk of dropout. The aim of the study is therefore to explore whether Danish MS and junior physicians enrolled in the Clinical basic education (CBE) have experienced mistreatment during their studies. Methods An online survey was conducted by email and sent to 5234 MS enrolled in one of four medical Master programs in Denmark or in the CBE. Reminders were distributed by email, shared in Facebook groups, and presented during lectures, accompanied by cards with QR codes for the survey. Data collection took place during spring 2023 and 645 completed the questionnaire giving a response rate of 12 %. The questions were based on the Everyday Discrimination Scale. Descriptive statistics and multivariate logistic regression were used for data analysis. Results MS most often encounter mistreatment from physicians, other health professionals and patients during their clinical internships. They also encounter mistreatment from lecturers and peers. MS who self-identify with another ethnicity than Danish/European were 3.2 times more likely than MS identifying with Danish/European ethnicity to report mistreatment from other students (95% CI 1.76 -5.95). Men were also less likely than women to report mistreatment. The mistreatment reported by MS is predominantly based on gender, ethnicity, religion, and age. The most frequent experiences are stereotypical statements (71,8%), lack of respect (65,1%) and being ignored (54,1%). Conclusions Our results indicate that Danish MS experience mistreatment, which can potentially impact their mental health. These results underscore the need for targeted interventions to create an inclusive educational environment that fosters the well-being and success of MS. Key messages • Danish medical students often face mistreatment from peers and health professionals, and more often reported by woman and students identifying with ethnic backgrounds other than Danish/European. • Action by University management is needed to implement targeted interventions such as diversity training, as mistreatment can negatively impact students’ mental health and educational outcomes.