BackgroundHypertension is a major risk factor for cardiovascular disease (CVD) which often escapes the diagnosis or should be confirmed by several office visits. The electrocardiogram (ECG) is one of the most widely used diagnostic tools and could be of paramount importance in patients’ initial evaluation.MethodsWe used machine learning (ML) techniques based features derived from the electrocardiogram for detecting hypertension in a population without CVD. We enrolled 1091 subjects who were classified into hypertensive and normotensive group. We trained a random forest (RF), to predict the existence of hypertension in patients based only on a few basic clinical parameters and ECG-derived features. We also calculated Shapley additive explanations (SHAP), a sophisticated feature importance analysis, to interpret each feature’s role in the random forest’s predictions.ResultsOur RF model was able to distinguish hypertensive from normotensive patients with accuracy 84.2 %, specificity 66.7%, sensitivity 91.4%, and area under the receiver-operating curve 0.86. Age, body mass index (BMI), BMI-adjusted Cornell criteria (BMI multiplied by RaVL+SV3), R wave amplitude in aVL, and BMI-modified Sokolow-Lyon voltage (BMI divided by SV1+RV5), were the most important anthropometric and ECG-derived features in terms of the success of our model.ConclusionsOur ML algorithm is effective in the detection of hypertension in patients using ECG-derived and basic anthropometric criteria. Our findings open new horizon in the detection of many undiagnosed hypertensive individuals who have an increased cardiovascular disease risk.