Simulation studies of cardiac arrhythmias at the whole heart level with electrocardiogram (ECG) gives an understanding of how the underlying cell and tissue level changes manifest as rhythm disturbances in the ECG. We present a 2D whole heart model (WHM2D) which can accommodate variations at the cellular level and can generate the ECG waveform. It is shown that, by varying cellular-level parameters like the gap junction conductance (GJC), excitability, action potential duration (APD) and frequency of oscillations of the auto-rhythmic cell in WHM2D a large variety of cardiac arrhythmias can be generated including sinus tachycardia, sinus bradycardia, sinus arrhythmia, sinus pause, junctional rhythm, Wolf Parkinson White syndrome and all types of AV conduction blocks. WHM2D includes key components of the electrical conduction system of the heart like the SA (Sino atrial) node cells, fast conducting intranodal pathways, slow conducting atriovenctricular (AV) node, bundle of His cells, Purkinje network, atrial, and ventricular myocardial cells. SA nodal cells, AV nodal cells, bundle of His cells, and Purkinje cells are represented by the Fitzhugh-Nagumo (FN) model which is a reduced model of the Hodgkin-Huxley neuron model. The atrial and ventricular myocardial cells are modeled by the Aliev-Panfilov (AP) two-variable model proposed for cardiac excitation. WHM2D can prove to be a valuable clinical tool for understanding cardiac arrhythmias.