Stroke is a serious global health issue with significant impacts on mortality and disability, particularly in developing countries like Indonesia. The prevalence of stroke is increasing over time, highlighting the need for improved access to quality healthcare services, disease prevention, and investments in medical personnel and healthcare infrastructure. One way to mitigate the impact of stroke is through CT scan examinations of the brain to determine the type of stroke a patient has, ensuring appropriate and efficient treatment. These examinations produce images that need to be analyzed by medical professionals, and this system can assist in the early classification of stroke types in patients. The process involves converting the patient's CT scan images into JPG format and performing preprocessing to enhance the images. Next, image segmentation is conducted to help the classification system quickly identify the parts of the image with important information. A Vision Transformer base 16 with a pretrained model is used to create the stroke classification model. This model achieved an accuracy rate of 91% on test data after optimizing the parameters using the grid search method. The parameters included a batch size of 32, 20 epochs, 128 layers, and a learning rate of 0.0001.