This paper demonstrates empirical research on using convolutional neural networks (CNN) of deep learning techniques to classify X-rays of COVID-19 patients versus normal patients by feature extraction. Feature extraction is one of the most significant phases for classifying medical X-rays radiography that requires inclusive domain knowledge. In this study, CNN architectures such as VGG-16, VGG-19, RestNet50, RestNet18 are compared, and an optimized model for feature extraction in X-ray images from various domains involving several classes is proposed. An X-ray radiography classifier with TensorFlow GPU is created executing CNN architectures and our proposed optimized model for classifying COVID-19 (Negative or Positive). Then, 2,134 X-rays of normal patients and COVID-19 patients generated by an existing open-source online dataset were labeled to train the optimized models. Among those, the optimized model architecture classifier technique achieves higher accuracy (0.97) than four other models, specifically VGG-16, VGG-19, RestNet18, and RestNet50 (0.96, 0.72, 0.91, and 0.93, respectively). Therefore, this study will enable radiologists to more efficiently and effectively classify a patient’s coronavirus disease.