Introduction: E-learning is essential in today's medical education, since it enhances the learning outcomes through easy access to resource materials and interactivity. Nonetheless, obstacles like technological aspects and the limited interaction of the student-teacher can impact its effectiveness. The purpose of this study was to understand how medical students perceive e-learning. Methods: A cross sectional study was conducted at the Faculty of Medicine and Pharmacy in Casablanca in 2023. A stratified cluster sampling method was adopted to select the participants. A self administrated questionnaire was distributed. We asked students about their demographic data, previous experience with online learning, learning formats preference and perception of e-learning. Results: A total of 373 students participated in the survey, with a mean age of 20.4 years and 61.4% being female. Just over half supported implementing e-learning (55.8%), about 63% of students had prior experience with the university's platform, and 59.8% found it easy to use. Most students preferred blended learning (74.8%) and asynchronous online learning (79.9%), additionally 72% favored live streaming with recordings as an e-learning resource. The primary advantage cited was flexibility (93.6%), whereas challenges included technical issues (71.5%) and limited interaction (54.8%). Prior experience significantly influenced students' positive perceptions of e-learning (p<0.001). Conclusion: Overall, medical students have a positive perception regarding e-learning, valuing its flexibility and convenience. However, technological difficulties must be resolved. These insights can help policymakers put effective e-learning infrastructure and strategies into place.