Coal tar is an effective treatment for psoriasis and eczema, but it contains several carcinogenic compounds. Occupational and animal studies have shown an increased risk of cancer after exposure to coal tar. Many dermatologists have abandoned this treatment for safety reasons, although the risk of cancer after coal tar in dermatological practice is unclear. This large cohort study included 13,200 patients with psoriasis and eczema. Information on skin disease and treatment, risk factors, and cancer occurrence was retrieved from medical files, questionnaires, and medical registries. Proportional hazards regression was used to evaluate differences in cancer risk by treatment modality. Patients treated with coal tar were compared with a reference category of patients treated with dermatocorticosteroids (assumed to carry no increased cancer risk). The median exposure to coal tar ointments was 6 months (range 1-300 months). Coal tar did not increase the risk of non-skin malignancies (hazard ratio (HR) 0.92; 95% confidence interval (CI) 0.78-1.09), or the risk of skin cancer (HR 1.09; 95% CI 0.69-1.72). This study has sufficient power to show that coal tar treatment is not associated with an increased risk of cancer. These results indicate that coal tar can be maintained as a safe treatment in dermatological practice.