Introduction: Hand hygiene is crucial to prevent cross infection. Healthcare students are in a prime position to learn hand hygiene skills. The aim of this study was to analyze hand hygiene behavioral intentions of healthcare students before and after contact with the patient and to compare the knowledge of and attitude towards hand hygiene between medical and nursing students. Methods: In a descriptive survey research design, convenience selection of a sample of medical students (n=657) and nursing students (n=303) was done from modules taught by the Department of Preventive Medicine and Public Health in both Medicine and Nursing undergraduate degrees in four Spanish universities. The hand hygiene Questionnaire, a validated instrument to evaluate behavior, knowledge, and attitudes, was used. Results: A significantly lower percentage of students reported always or almost always carrying out hand hygiene before contact with the patient or invasive procedures in comparison to the percentage complying after contact with secretions or with the patient. Although hand hygiene knowledge appears acceptable, its importance is not sufficiently valued.Conclusions: There are deficiencies in behavioral intention, knowledge, and attitudes related to hand hygiene in medical and nursing students. Better results are observed among nursing students, especially those who have received specific training