This cross-sectional study assessed the knowledge, attitude, and practices (KAP) regarding skin cancer among dermatology clinic patients, medical students, and general practitioners (GPs) in Tehran, Iran. The researchers collected data using a validated questionnaire administered online, measuring KAP on scales of 0–31, 0–16, and 0–28, respectively, with scores above 16, 8, and 14 indicating “good” levels. Of 2243 participants (mean age 28 years), 59.4% had good knowledge, 19.8% had good attitudes, 31.8% had good practices, and 29.8% had good overall KAP. Medical students/GPs scored higher on knowledge and attitudes, while patients scored better on practices. Knowledge, attitudes, and practices were positively correlated in professionals but inversely correlated in patients. The findings suggest that while knowledge was moderate, attitudes and behaviors remained poor, particularly among patients. Immediate interventions are needed to improve attitudes and prevention practices, as public health initiatives must focus on positively influencing both to translate knowledge into meaningful action and find the reasons why good knowledge may not always lead to good practice. These findings underline the need for targeted interventions to bridge the gap between knowledge and preventive behaviors, to effectively reduce the burden of skin cancer in the population.