Electrocardiograms (ECGs) are widely used for diagnosing cardiac arrhythmia based on the deformation of signal shapes due to changes in various heart diseases. However, these abnormal signs may not be observed in some 12 ECG channels, depending on the location, the heart shape, and the type of cardiac arrhythmia. Therefore, it is necessary to closely and comprehensively observe ECG records acquired from 12 channel electrodes to diagnose cardiac arrhythmias accurately. In this study, we proposed a clustering algorithm that can classify persistent cardiac arrhythmia as well as episodic cardiac arrhythmias using the standard 12-lead ECG records and the 2D CNN model using the time–frequency feature maps to classify the eight types of arrhythmias and normal sinus rhythm. The standard 12-lead ECG records were provided by China Physiological Signal Challenge 2018 and consisted of 6877 patients. The proposed algorithm showed high performance in classifying persistent cardiac arrhythmias; however, its accuracy was somewhat low in classifying episodic arrhythmias. If our proposed model is trained and verified using more clinical data, we believe it can be used as an auxiliary device for diagnosing cardiac arrhythmias.