Brain tumor classification is crucial for medical evaluation in computer-assisted diagnostics (CAD). However, manual diagnosis of brain tumors from magnetic resonance imaging (MRI)can be time-consuming and complex, leading to inaccurate detection and classification. This is mainly because brain tumor identification is a complex procedure that relies on different modules. The advancements in Deep Learning (DL) have assisted in the automated process of medical images and diagnostics for various medical conditions, which benefits the health sector. Convolutional Neural Network (CNN) is one of the most prominent DL methods for visual learning and image classification tasks. This study presents a novel CNN algorithm to classify the brain tumor types of glioma, meningioma, and pituitary. The algorithm was tested on benchmarked data and compared with the existing pre-trained VGG16, VGG19, ResNet50, MobileNetV2, and InceptionV3 algorithms reported in the literature. The experimental results have indicated a high classification accuracy of 98.04%, precision, recall, and f1-score success rate of 98%, respectively. The classification results proved that the most common kinds of brain tumors could be categorized with a high level of accuracy. The presented algorithm has good generalization capability and execution speed that can be helpful in the field of medicine to assist doctors in making prompt and accurate decisions associated with brain tumor diagnosis.