The following article presents the development of a model based on convolutional neural networks for image classification of primary brain tumors (glioma, meningioma and pituitary) and healthy patients (non-tumor). For this purpose, a set of experiments is established where different hyperparameters are evaluated, comparing their performance based on performance indices, in order to select a useful model. Finally, a CNN architecture with an overall performance of 96% for four classes is presented.