Skin is an external organ that covers the human body and plays an important role in maintaining the health and integrity of the body. One of the main threats to the skin is skin cancer, which can cause serious damage and even death. Traditional diagnosis of skin cancer often involves expensive and invasive biopsies. Risk factors include exposure to ultraviolet light, genetic factors, unhealthy lifestyles, and human papillomavirus infection. Early detection is very important but difficult because it is difficult to differentiate between malignant and non-malignant skin lesions. Deep learning methods, such as Convolutional Neural Network (CNN), offer solutions with accurate skin image classification capabilities, facilitating faster and more efficient skin cancer diagnosis. This study explores the use of CNNs to classify skin cancers based on dermoscopic images. With a dataset of 10,015 images divided into training data (75%) and test data (25%), the model developed using transfer learning techniques achieved 97.38% accuracy, with validation accuracy of 97.39% after 200 epochs. White box testing shows two independent paths, indicating the program is not complex and easy to fix. Black box testing and User Acceptance Testing (UAT) show a 100% success rate. The classification shows an average precision, recall, and f1_score value of 97%, which is a significant increase from previous research. This research also corrects the weaknesses of previous research by increasing the number of classes from two to seven, and the dataset from 5,000 to 10,015 images, resulting in a more accurate and representative diagnosis in skin cancer detection.