In the present paper, ultrasonic testing of rails (used in railway tracks) with vertical cracks is investigated experimentally and by numerical simulations. For this purpose, four different rail specimens were used. An ideal rail without any crack and three specimens with vertical cracks synthetically generated in the head, neck and bottom of the rail, respectively. The experimental measurements were done with normal piezoelectric longitudinal and shear wave ultrasonic transducers in pulse-echo configuration. For better interpretation of the received signals, wave propagation in the cross section of the rail was modeled numerically using an optimized version of the EFIT code (Elastodynamic Finite Integration Technique) which was adapted to the special testing situation and complex rail geometry. The simulations are in good agreement with the experimental results for all specimens dealt with.