The analysis and processing of electrocardiogram (ECG) signals is a vital step in the diagnosis of cardiovascular disease. ECG offers a non-invasive and risk-free method for monitoring the electrical activity of the heart that can assist in predicting and diagnosing heart diseases. The manual interpretation of the ECG signals, however, can be challenging and time-consuming even for experts. Machine learning techniques are increasingly being utilized to support the research and development of automatic ECG classification, which has emerged as a prominent area of study. In this paper, we propose a deep neural network model with residual blocks (DNN-RB) to classify cardiac cycles into six ECG beat classes. The MIT-BIH dataset was used to validate the model resulting in a test accuracy of 99.51%, average sensitivity of 99.7%, and average specificity of 98.2%. The DNN-RB method has achieved higher accuracy than other state-of-the-art algorithms tested on the same dataset. The proposed method is effective in the automatic classification of ECG signals and can be used for both clinical and out-of-hospital monitoring and classification combined with a single-lead mobile ECG device. The method has also been integrated into a web application designed to accept digital ECG beats as input for analyses and to display diagnostic results.