Chart review is an important tool to identify patient hazards. Most advanced medical students perform poorly during chart review but can learn how to identify patient hazards context-independently. Many hospitals have implemented electronic health records, which enhance patient safety but also pose challenges. We investigated whether electronic charts impair advanced medical students' recognition of patient hazards compared with traditional paper charts. Fifth-year medical students were randomized into two equal groups. Both groups attended a lecture on patient hazards and a training session on handling electronic health records. One group reviewed an electronic chart with 12 standardized patient hazards and then reviewed another case in a paper chart; the other group reviewed the charts in reverse order. The two case scenarios (diabetes and gastrointestinal bleeding) were used as the first and second case equally often. After each case, the students were briefed about the patient safety hazards. In total, 78.5% of the students handed in their notes for evaluation. Two blinded raters independently assessed the number of patient hazards addressed in the students' notes. For the diabetes case, the students identified a median of 4.0 hazards [25%-75% quantiles (Q25-Q75): 2.0-5.5] in the electronic chart and 5.0 hazards (Q25-Q75: 3.0-6.75) in the paper chart (equivalence testing, p = 0.005). For the gastrointestinal bleeding case, the students identified a median of 5.0 hazards (Q25-Q75: 4.0-6.0) in the electronic chart and 5.0 hazards (Q25-Q75: 3.0-6.0) in the paper chart (equivalence testing, p < 0.001). We detected no improvement between the first case [median 5.0 (Q25-Q75: 3.0-6.0)] and second case [median, 5.0 (Q25-Q75: 3.0-6.0); p < 0.001, test for equivalence]. Electronic charts do not seem to facilitate advanced medical students' recognition of patient hazards during chart review and may impair expertise formation.