Recent research has investigated the use of autofluorescence (AF) for distinguishing between normal and cancerous tissues according to different fluorescence characteristics. To analyze if AF can help differentiate cancerous lesions from other nonneoplastic lesions, such as dermatitis, in each layer of the skin ex vivo. Paraffin wax-embedded tissue samples were obtained from patients who were histopathologically diagnosed with squamous cell carcinoma (SCC), psoriasis, chronic dermatitis (lichen simplex chronicus, prurigo nodularis) or acute dermatitis (atopic dermatitis). AF intensity was measured in four layers of the epidermis (corneal, granular, spinous and basal) and two layers of the dermis (papillary and reticular). AF was highest in all layers of psoriasis samples compared with all layers of all other groups. Higher AF values were seen in SCC compared with all skin layers of acute and chronic dermatitis; this finding was especially true in the corneal layer, papillary dermis and reticular dermis. This ex vivo AF study provides basic data for future in vivo studies of AF as a noninvasive diagnostic tool.