AIMS: The application of computer assisted techniques to the electrocardiogram (ECG) analysis is showing promising results. Our main aim was to apply a machine learning approach to the ECG analysis in patients with hypertrophic cardiomyopathy (HCM), to identify predictors of macroscopic fibrosis, a marker of ventricular arrhythmias and sudden cardiac death. METHODS: 136 patients diagnosed with HCM were included. The main clinical and echocardiographic variables were collected. All patients underwent cardiac magnetic resonance (CMR) and the presence of macroscopic fibrosis was assessed on late gadolinium enhancement (LGE) sequences. From the 12‑lead digitized ECGs of each patient 468 morphological variables were quantified with a dedicated software. RESULTS: The mean age of the population was 62.6 ± 14.1 years, and in 82 patients (60.3 %) LGE was observed. After preselecting significant ECG variables from the univariate analysis, a multivariate regression was performed, obtaining a predictive model composed of five parameters: the duration of the QRS in I, the duration of the QT interval in V3, the duration of the T wave in aVF, the peak-to peak amplitude of the QRS in V1, and the amplitude of the S wave in V4. A random forest algorithm confirmed that the duration of the QRS was the strongest predictor of fibrosis. CONCLUSION: In patients with HCM the addition of a computer-assisted ECG analysis can help to identify predictors of LGE, being the duration of the QRS the strongest one. Our findings can be especially useful when access to CMR is scarce, to select patients at higher risk.