Background Contact allergy is a prevalent disorder. It is estimated that about 20% of the general population are allergic to one or more of the chemicals that constitute the European baseline patch test panel. While many studies have investigated associations between type I allergic disorders and cancer, few have looked into the association between cancer and contact allergy, a type IV allergy. By linking two clinical databases, the authors investigate the possible association between contact allergy and cancer. Methods Record linkage of two different registers was performed: (1) a tertiary hospital register of dermatitis patients patch tested for contact allergy and (2) a nationwide cancer register (the Danish Cancer Register). After linking the two registers, only cancer subtypes with 40 or more patients registered were included in the analysis. The final associations were evaluated by logistic regression analysis. Results An inverse association between contact allergy and non-melanoma skin- and breast cancer, respectively, was identified in both sexes, and an inverse trend for brain cancer was found in women with contact allergy. Additionally, a positive association between contact allergy and bladder cancer was found. Conclusion The inverse associations support the immunosurveillance hypothesis (ie, individuals with an allergy are less likely to get cancer due to a triggered immune system), while the positive association with bladder cancer could be due to accumulations of chemical metabolites in the bladder. The authors' findings add to the limited knowledge about contact allergy and the risk of cancer.